Merge remote-tracking branch 'origin/test'

# Conflicts:
#	src/jmapNew/config/skinCode/datie_02.js
This commit is contained in:
joylink_zhangsai 2022-07-21 18:09:03 +08:00
commit 44363cc3e8
45 changed files with 2012 additions and 710 deletions

View File

@ -521,3 +521,11 @@ export function getRunplanInRailway(group) {
method: 'get'
});
}
// 大铁 获取 ctc 车站 运行日志
export function getRunplanInStation(group) {
return request({
url: `/api/simulation/${group}/ctc/station/runPlan/list`,
method: 'get'
});
}

View File

@ -8,4 +8,10 @@ export function uploadAudioFiles(file) {
data: file
});
}
/** 获取百度语音合成token */
export function getBaiduToken() {
return request({
url: `/api/voice/token/baidu`,
method: 'get'
});
}

View File

@ -165,10 +165,11 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
function trainRunNew(data){
let code = data.code;
// console.log(rails.sectionrail[data.section],data.section,code,'--------')
if(rails.sectionrail[data.section]){
if(trainlisttest.list[code].right != data.right){
if(data.right == "0"){
console.log('right==0')
trainlisttest.list[code].right = "0";
trainlisttest.list[code].rotation.y = Math.PI;
let point = rails.sectionrail[data.section].lineleft.getPointAt(data.offset);
@ -210,6 +211,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
}
if(data.right == "1"){
console.log('right==1')
trainlisttest.list[code].right = "1";
trainlisttest.list[code].rotation.y = 0;
let point = rails.sectionrail[data.section].lineleft.getPointAt(data.offset);
@ -250,8 +252,9 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
}
// console.log(data);
if(trainlisttest.list[code].dispose == "0"){
console.log(trainlisttest.list[code].dispose,'88888888');
if(trainlisttest.list[code].dispose == "0") {
console.log(trainlisttest.list[code].dispose,'-----------');
if (data.right == '1') { // 向右
trainlisttest.list[code].right = '1';
trainlisttest.list[code].progress = data.offset;
@ -434,7 +437,9 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
}
}
console.log(code,trainlisttest.list[code].position.x,trainlisttest.list[code].position.y,trainlisttest.list[code].position.z, '666666')
}else{
// console.log(code,'trainlisttest.list[code].position.x = -1000000')
trainlisttest.list[code].position.x = -1000000;
}
@ -564,6 +569,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
trainlisttest.list[code].position.y = 0;
// trainlisttest.list[code].progress = 0;
trainlisttest.list[code].dispose = "0";
debugger
trainlisttest.list[code].nowcode = data.body.deviceList[i].section;
trainlisttest.list[code].nextcode = null;
trainlisttest.list[code].curve = null;

View File

@ -395,8 +395,8 @@ class SkinCode extends defaultStyle {
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
purpleColor:'#840084', // 控制模式紫色
strokeColor: '#fff',
lineWidth: 1
strokeColor: '#fff',
lineWidth: 1
},
emergencyControl: { // 紧急站控
show: false,
@ -427,79 +427,81 @@ class SkinCode extends defaultStyle {
arrowShow: false,
grayColor: '#7F7F7F'
},
veryControl: {
show: true,
offset: { x: 0, y: 0 },
lightColor: '#f00',
defaultColor: '#7F7F7F',
text: '非常站控'
},
selfDiscipline: {
show: true,
offset: { x: 0, y: 0 },
text: '允许自律'
},
selfDisciplineControl: {
show: true,
offset: { x: 0, y: 0 },
lightColor: '#0f0',
defaultColor: '#7F7F7F',
text: '自律控制'
},
veryControlButton: {
offset: { x: 0, y: 0 },
text: '非常站控',
lightColor: '#ff0',
defaultColor: '#ccc',
},
selfDisciplineThree: {
offset: { x: 0, y: 0 },
text: '分散自律',
lightColor: '#0f0',
defaultColor: '#ccc'
},
graphRoad: {
show: true,
offset: { x: 0, y: 0 },
text: '按图排路',
lightColor: '#0f0',
defaultColor: '#ccc'
},
planControl: {
show: true,
offset: { x: 0, y: 0 },
text: '计划控制',
lightColor: '#0f0',
defaultColor: '#ccc'
},
centerCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '中心通信',
lightColor: '#0f0',
defaultColor: '#ccc'
},
selfDisciplineCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '自律机通信',
lightColor: '#0f0',
defaultColor: '#ccc'
},
allowedTurnBack: {
show: true,
offset: { x: 0, y: 30 },
text: '允许转回',
lightColor: '#0f0',
defaultColor: '#ccc'
},
trainControl: {
show: true,
offset: { x: 0, y: 30 },
text: '列控',
lightColor: '#0f0',
defaultColor: '#ccc'
}
veryControl: {
show: true,
offset: { x: 0, y: 0 },
lightColor: '#f00',
defaultColor: '#7F7F7F',
text: '非常站控'
},
selfDiscipline: {
show: true,
offset: { x: 0, y: 0 },
text: '允许自律',
defaultColor: '#7F7F7F',
lightColor: '#ff0'
},
selfDisciplineControl: {
show: true,
offset: { x: 0, y: 0 },
lightColor: '#0f0',
defaultColor: '#7F7F7F',
text: '自律控制'
},
veryControlButton: {
offset: { x: 0, y: 0 },
text: '非常站控',
lightColor: '#ff0',
defaultColor: '#ccc'
},
selfDisciplineThree: {
offset: { x: 0, y: 0 },
text: '分散自律',
lightColor: '#0f0',
defaultColor: '#ccc'
},
graphRoad: {
show: true,
offset: { x: 0, y: 0 },
text: '按图排路',
lightColor: '#0f0',
defaultColor: '#ccc'
},
planControl: {
show: true,
offset: { x: 0, y: 0 },
text: '计划控制',
lightColor: '#0f0',
defaultColor: '#ccc'
},
centerCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '中心通信',
lightColor: '#0f0',
defaultColor: '#ccc'
},
selfDisciplineCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '自律机通信',
lightColor: '#0f0',
defaultColor: '#ccc'
},
allowedTurnBack: {
show: true,
offset: { x: 0, y: 30 },
text: '允许转回',
lightColor: '#0f0',
defaultColor: '#ccc'
},
trainControl: {
show: true,
offset: { x: 0, y: 30 },
text: '列控',
lightColor: '#0f0',
defaultColor: '#ccc'
}
}
};
@ -849,9 +851,10 @@ class SkinCode extends defaultStyle {
lrPadding: 4, // 两边间隔
upPadding: 4, // 上边距离
trainBodyFillColor: '#88DF8E', // 列车车身填充颜色
trainSidelineColor: '#F00',
trainSidelineStopColor: '#000',
trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
trainSidelineColor: '#F00',
trainSidelineStopColor: '#000',
// trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
trainNameFormat:'tripNumber'
},
directionArrow: {
},
@ -874,20 +877,21 @@ class SkinCode extends defaultStyle {
trainNumber: {
targetCodePrefix: '000', // 目的地码前缀
defaultTargetCode: 'DDD', // 默认目的地码
fontColor: '#F00',
trainTargetTextAlign: 'left', // 目的地码文字显示位置
fontColor: '#F00',
trainTargetTextAlign: 'left', // 目的地码文字显示位置
trainNumberOffset: { x: 24, y: 4}// 目的地码偏移量
},
trainServer: {
serviceNumberPrefix: '000', // 服务号(表号)前缀
defaultServiceNumber: 'TTT', // 默认服务号(表号)
defaultServerNoColor: '#F00', // 默认服务号状态显示颜色
fontColor: '#F00',
fontColor: '#F00',
trainServerOffset: { x: 4, y: 4} // 列车服务号偏移
},
trainTarget: {
tripNumberPrefix: '000', // 车次号前缀
defaultTripNumber: 'DDD', // 默认车次号2
tripNumberPrefix: '', // 车次号前缀
// defaultTripNumber: 'DDD', // 默认车次号2
defaultTripNumber: ' ', // 默认车次号
trainTargetOffset: { x: 36, y: 4}, // 列车车次号偏移
trainTargetTextAlign: 'right' // 车次号文字显示位置
},
@ -899,13 +903,13 @@ class SkinCode extends defaultStyle {
trainHead: {
trainConntWidth: 10, // 列车竖杠的宽度
trainHeadFillColor: '#189B4D', // 列车车头矩形填充颜色
trainHeadRectNoChange: true, // 列车车头矩形填充颜色不变
trainHeadRectNoChange: true, // 列车车头矩形填充颜色不变
trainHeadRectHeight: 20, // 列车车头矩形高度
directionStopType:'specialAll', // special 西安二号线 停车 列车方向图标不消失 normal 正常
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
trainHeadArrowWidth: 15, // 列车车头三角宽度
trainHeadArrowOffsetX: 0, // 列车车头三角偏移
trainHeadRectOffsetX: 10
trainHeadRectOffsetX: 10
},
common: {
trainHeight: 20, // 列车高度
@ -955,16 +959,16 @@ class SkinCode extends defaultStyle {
{
type: 1,
lineLShow: true,
arrowLShow: false,
arrowLShow: false,
lineRShow: false,
arrowRShow: true
arrowRShow: true
},
{
type: 0,
lineLShow: false,
arrowLShow: true,
arrowLShow: true,
lineRShow: true,
arrowRShow: false
arrowRShow: false
}
], // 列车停止方向类型对应车头显示状态 1从左往右 0从右往左
driveModeStatus: [
@ -1012,125 +1016,125 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.DepartArrow] = {
triangleLength: 15,
lineWidth: 8,
length: 35,
distance: 15,
fill: '#000',
stroke: '#fff',
fontSize: 11,
defaultText: '发车',
defaultColor: '#ccc',
triangleLength: 15,
lineWidth: 8,
length: 35,
distance: 15,
fill: '#000',
stroke: '#fff',
fontSize: 11,
defaultText: '发车',
defaultColor: '#ccc',
occupiedColor:'#f00',
noOccupiedColor:'#00ff00',
blockStatusColor:'#00ff00',
noBlockStatusColor:'#ffff00',
};
noBlockStatusColor:'#ffff00'
};
this[deviceType.PickArrow] = {
triangleLength: 15,
lineWidth: 8,
length: 35,
distance: 15,
fill: '#000',
stroke: '#fff',
fontSize: 11,
defaultText: '接车',
defaultColor: '#ccc',
triangleLength: 15,
lineWidth: 8,
length: 35,
distance: 15,
fill: '#000',
stroke: '#fff',
fontSize: 11,
defaultText: '接车',
defaultColor: '#ccc',
occupiedColor:'#f00',
noOccupiedColor:'#ffff00',
blockStatusColor:'#00ff00',
noBlockStatusColor:'#ffff00',
};
this[deviceType.Occlusion] = {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#ccc' // 控制灯颜色
}
};
this[deviceType.Accident] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.Recovery] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.PickAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.DepartAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.TotalAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.AssistStatus] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc',
occupiedColor:'#ffffff',
}
};
this[deviceType.SectionOccupied] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc',
occupiedColor:'#ff0000',
}
};
noBlockStatusColor:'#ffff00'
};
this[deviceType.Occlusion] = {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#ccc' // 控制灯颜色
}
};
this[deviceType.Accident] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.Recovery] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.PickAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.DepartAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.TotalAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.AssistStatus] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc',
occupiedColor:'#ffffff'
}
};
this[deviceType.SectionOccupied] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc',
occupiedColor:'#ff0000'
}
};
}
}

View File

@ -5,7 +5,8 @@ class SkinCode extends defaultStyle {
super();
this.fontFamily = '宋体';
this[deviceType.Section] = {
elemnetType:['name', 'line', 'separator', 'badShunt', 'derailer'],
elemnetType:['name', 'line', 'separator', 'derailer'],
// 'badShunt'
name: {
z: 10,
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
@ -33,6 +34,7 @@ class SkinCode extends defaultStyle {
z: 0,
width: 3, // 区段宽度
beyondWidth: 0, // 区段宽超出宽度
badShuntDashLine:true, // 区段分路不良标记
invadeColor: '#FF0000', // 区段侵入颜色 (红色)
spareColor: '#808080', // 区段空闲颜色 (灰色) ok
@ -53,11 +55,99 @@ class SkinCode extends defaultStyle {
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
logicalTextColor: '#C0C0C0', // 逻辑区段名称颜色 (未用)
invalidColor: '#B18E38' // 区段ARB故障颜色
},
separator: {
z: 3, // 分割符层级
width: 1, // 物理区段分隔符宽度
logicWidth:2, // 逻辑区段分隔符宽度
endWidth: 2, // 尽头分隔符宽度
endColor: 'rgb(128,128,128)', // 尽头分隔符颜色
color: 'rgb(128,128,128)', // 区段边界符颜色
invadeColor:'#f00', // 区段特殊侵限边界符颜色
invadeSpecial:true, // 特殊侵限
halfHeight: 6 // 区段分隔符高度的一半
},
derailer: {
text: {
color: 'green',
offset: {
x: -5,
y: -15
}
},
symbol: {
color: 'red'
}
}
};
this[deviceType.Signal] = {
distance: 10
distance: 10,
post: {
standardLength: 6, // 高柱长度
standardHeight: 6, // 灯柱高度
standardColor: '#FFFFFF', // 灯柱颜色
standardVerticalWidth: 2, // 灯柱竖杆宽度
standardRailWidth: 2 // 灯柱横杆宽度
},
text: {
show: true, // 信号机名称显示
distance: 3, // 文字和灯杆的距离
isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: 'rgb(192,192,192)', // 信号灯字体默认色
// '#FFFFFF'
blockColor: '#FFFFFF', // 信号灯字体锁定颜色
checkColor: '#00FF00' // 信号保护区段检查颜色
},
remainTimeColor: '#F00',
dtTextNearSignalOffset:{x:35, y:5}, // 人工解锁延时时间坐标靠近信号机名称
lamp: {
bgShow: false, // 是否被选中
guidName: 'singleRY', // 成都三号线引导类型
borderVariable: false, // 信号灯边框可变
stopWidth: 2, // 禁止线宽度
borderWidth: 2, // 信号灯边框线宽度
borderColor: '#677DBB', // 信号灯边框线颜色
radiusR: 6, // 信号灯半径
grayColor: '#7F7F7F', // 信号灯灰色
redColor: '#FF0000', // 信号灯红色
greenColor: '#00FF00', // 信号灯绿色
yellowColor: '#FFFF00', // 信号灯黄色
whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0070C0', // 信号灯蓝色
faultType: 'light', // 信号机故障类型 light闪
special:true // 大铁类型信号机
},
route: {
direction: true, // 自动通过方向
offset: { x: 4, y: 0}, // 自动通过偏移量
routeColor: '#00FF00', // 自动进路
radiusR: 6
},
auto: {
signalFrontTriangle: true, // 信号灯前三角展示
fleetModeTriangle: true, // 自动进路显示三角形非箭头
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' // 字体粗细
},
lowButton:{
display: false // 现地 信号机按钮
}
};
@ -112,11 +202,138 @@ class SkinCode extends defaultStyle {
borderColor:'', // 字体边框颜色
textBorderWidth:0 // 字体边框宽度
},
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
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: 46, // 控制模式之间灯之间的距离
grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
purpleColor:'#840084', // 控制模式紫色
strokeColor: '#fff',
lineWidth: 1
},
emergencyControl: { // 紧急站控
show: false,
offset: { x: 0, y: 0 },
text: '紧急站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: false,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: false,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
},
veryControl: {
show: true,
offset: { x: 0, y: 0 },
lightColor: '#f00',
defaultColor: '#7F7F7F',
text: '非常站控'
},
selfDiscipline: {
show: true,
offset: { x: 0, y: 0 },
text: '允许自律',
defaultColor: '#7F7F7F',
lightColor: '#ff0'
},
selfDisciplineControl: {
show: true,
offset: { x: 0, y: 0 },
lightColor: '#0f0',
defaultColor: '#7F7F7F',
text: '自律控制'
},
veryControlButton: {
offset: { x: 0, y: 0 },
text: '非常站控',
lightColor: '#ff0',
defaultColor: '#ccc'
},
selfDisciplineThree: {
offset: { x: 0, y: 0 },
text: '分散自律',
lightColor: '#0f0',
defaultColor: '#ccc'
},
graphRoad: {
show: true,
offset: { x: 0, y: 0 },
text: '按图排路',
lightColor: '#0f0',
defaultColor: '#ccc'
},
planControl: {
show: true,
offset: { x: 0, y: 0 },
text: '计划控制',
lightColor: '#0f0',
defaultColor: '#ccc'
},
centerCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '中心通信',
lightColor: '#0f0',
defaultColor: '#ccc'
},
selfDisciplineCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '自律机通信',
lightColor: '#0f0',
defaultColor: '#ccc'
},
allowedTurnBack: {
show: true,
offset: { x: 0, y: 30 },
text: '允许转回',
lightColor: '#0f0',
defaultColor: '#ccc'
},
trainControl: {
show: true,
offset: { x: 0, y: 30 },
text: '列控',
lightColor: '#0f0',
defaultColor: '#ccc'
}
}
};
@ -126,21 +343,100 @@ class SkinCode extends defaultStyle {
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
offset: {x: 5, y: -10}, // 道岔名称与区段距离
fontSize: 11, // 字体大小
fontColor: '#fff', // 道岔名称颜色
fontColor: '#FFFF00', // 道岔名称颜色
fontWeight: 'normal', // 字体粗细
borderColor: '#FE0000', // 道岔边框颜色
lossColor: '#C00808', // 道岔失去颜色
lossColor: '#FFFF00', // 道岔失去颜色
blockText:'#fff', // 道岔封锁文字颜色
blockTextBack:'#f00', // 道岔封锁文字背景颜色
lockTextBack:'#fff', // 道岔单锁文字背景颜色
fpLockColor:'#f00', // 道岔侧防文字背景颜色
guideMasterLockColor:'#f00', // 道岔引导总锁文字背景颜色
locateColor: '#00FF00', // 道岔定位颜色 ok
inversionColor: '#FFFF00', // 道岔反位颜色 ok
// #808080
locateColor: 'rgb(192,192,192)', // 道岔定位颜色 ok
inversionColor: 'rgb(192,192,192)', // 道岔反位颜色 ok
monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
monolockLocationColor: '#f00', // 道岔单锁'定位'颜色 (绿色)
monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
faultFlashing: false // 故障闪烁
},
sectionAction: {
flag: false, // 道岔 关联区段显示
spareColor: '#808080' // 区段显示颜色
},
core: {
length: 6, // 道岔单边长度
graphShow: true, // 图形显示
specialCircle:true, // 大铁线路III型 定反位 实心小圆圈
graphInversionColor: '#FFFF00', // 反位颜色
graphLocalColor: '#00FF00', // 定位颜色
lossActionColor:'#fff', // 失表颜色
forkActionColor:'#f00'// 挤岔颜色
},
rectLock: { // 矩形封锁框图形
rectWidth: 18, // 矩形框 宽高
rectBorderColor: '#fff', // 矩形边框颜色
block: false, // 封锁显示
blockColor: 'red', // 封锁颜色
followName: true // 位置跟随名称确定
},
jointImg: { // 道岔 A B C D四元素属性配置
trapezoidLength: 8, // 直角梯形元素默认长度
faultStatus: true, // 挤岔表示
fork: true, // 挤岔专用(如有挤岔操作 变为true
forKColor: 'red' // 挤岔颜色 配合挤岔专用
}
};
this[deviceType.Train] = {
trainBody: {
fontFamily: 'consolas',
trainBodyLineWidth: 1, // 车身line宽
changeTrainWidth: true, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [
{
type: '03',
serviceNumber: '---',
// nameFormat: 'groupNumber:serviceNumber'
nameFormat:'tripNumber'
},
{
type: '03',
// nameFormat: 'serviceNumber:trainNumber'
nameFormat:'tripNumber'
}
], // 特殊列车类型需设置显示格式
lrPadding: 4, // 两边间隔
upPadding: 4, // 上边距离
trainBodyFillColor: '#88DF8E', // 列车车身填充颜色
trainSidelineColor: '#F00',
trainSidelineStopColor: '#000',
// trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
trainNameFormat:'tripNumber'
},
directionArrow: {
},
common: {
trainHeight: 20, // 列车高度
trainHeadDistance: 2, // 列车和车头之间的间距
trainWidth: 48, // 列车长度
trainTextFontSize: 12, // 列车字号
fontFamily: 'consolas', // 默认字体 族类
haveTextHSDA: false, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
trainTip:true // 鼠标悬停列车状态信息框是否显示
}
};
this[deviceType.TrainWindow] = {
lineColor: '#4DD43F', // 车次窗颜色
lineDash: null, // 车次窗虚线间隔
lineWidth: 1, // 车次窗线宽
trainWindowSmooth: 0, // 车次窗矩形圆滑程度
show: true // 车次窗是否显示
};
}

View File

@ -84,8 +84,16 @@ class Jlmap {
return selectLineCode(lineCode);
}
reloadStyle(lineCode) {
if (this.lineCode !== lineCode) {
this.handleModelData(this.lineCode, lineCode);
}
this.lineCode = lineCode;
this.style = selectLineCode(lineCode);
this.$zr.dom.style.backgroundColor = this.style.backgroundColor || '#000';
}
// 处理私有属性
handleModelData(oldLineCode, lineCode) {
}
loadDefaultState() { // 加载默认状态
const defaultStateDict = {};

View File

@ -306,7 +306,7 @@ class MouseController extends Eventful {
if (this.whetherInclude(boundingRect, deviceBoundingRect )) {
includeDeviceList.push(item);
} // item.instance._type !== deviceType.TrainWindow &&
} else if (item.instance && item.instance._type !== deviceType.CheckBox && item.instance._type !== deviceType.Train) {
} else if (item.instance && item.instance._type !== deviceType.CheckBox && item.instance._type !== deviceType.Train && (window.location.href.indexOf('pictureDraw') > -1 && item.instance._type === deviceType.TrainWindow) ) {
const rect = item.instance.getBoundingRect();
const deviceBoundingRect = {
x1: rect.x,

View File

@ -580,6 +580,10 @@ export default class ELines extends Group {
}
}
setDashed() {
this.section.setStyle('lineDash', [2, 2]);
}
addHover(style) {
this.__zr && this.__zr.addHover(this.section, style);
}
@ -590,6 +594,9 @@ export default class ELines extends Group {
recover() {
this.section && this.section.show();
if (this.model.style.Section.line.badShuntDashLine) {
this.section && this.section.setStyle('lineDash', null);
}
this.centerSquare && this.centerSquare.stopAnimation(true);
this.centerSquare && this.centerSquare.setStyle({fill: this.model.style.Section.cross.centerSquare.defaultColor});
}

View File

@ -92,7 +92,8 @@ export default class ESeparator extends Group {
shape: {
cx: modelData.point.x,
cy: modelData.point.y,
r: this.style.Section.line.width
r: this.style.Section.separator.halfHeight
// this.style.Section.line.width+
},
style: {
stroke: this.style.Section.line.invadeColor,
@ -123,6 +124,26 @@ export default class ESeparator extends Group {
return partition;
}
createVertical(modelData) {
let partition;
const style = this.model.style;
let points = [];
let lineWidth = 0;
const tanRate = modelData.traingle.getSinRate();
points = [
[modelData.point.x, modelData.point.y - (style.Section.separator.halfHeight)],
[modelData.point.x, modelData.point.y + (style.Section.separator.halfHeight)]
];
lineWidth = modelData.type == '02' ? style.Section.separator.logicWidth : style.Section.separator.width;
if ((modelData.type == '03' || modelData.type == '01') && tanRate != 0 && tanRate != 1) {
partition = this.createModel(modelData, points, lineWidth, style.Section.line.transparentColor, Math.PI);
} else {
partition = this.createModel(modelData, points, lineWidth);
}
return partition;
}
// sepical:true, // 特殊类型 道岔C区段 分隔符为横向
createNormal(modelData) {
let partition;
const style = this.model.style;
@ -218,7 +239,7 @@ export default class ESeparator extends Group {
partition = [this.createModel(modelData, points, lineWidth, stroke)];
} else if (type === '04') { // 侵限分隔符
if (this.style.Section.separator.invadeSpecial) {
partition = [this.createNormal(modelData), this.createCircle(modelData)];
partition = [this.createVertical(modelData), this.createCircle(modelData)];
} else {
partition = [this.createCircle(modelData)];
}

View File

@ -549,7 +549,11 @@ export default class Section extends Group {
// 分路不良
badShuntStatus() {
this.badShunt && this.badShunt.show();
if (this.style.Section.line.badShuntDashLine) {
this.line.setDashed();
} else {
this.badShunt && this.badShunt.show();
}
}
/** 计算提示位置*/

View File

@ -375,13 +375,23 @@ class Signal extends Group {
});
const timeNameY = computedPosition.y + model.positionPoint.y - posit * 15;
// 人工解锁延时时间坐标靠近信号机名称 大铁III型
let remainX = sigNameX;
let remainY = timeNameY;
if (style.Signal.dtTextNearSignalOffset) {
remainX = computedPosition.x + style.Signal.dtTextNearSignalOffset.x * drict;
remainY = sigNameY + style.Signal.dtTextNearSignalOffset.y * posit;
}
this.remainTimeName = new ESigName({
zlevel: this.zlevel,
z: this.z,
silent: false,
style: style,
x: sigNameX,
y: timeNameY,
x: remainX,
// + offsetX,sigNameX
y: remainY,
// + offsetY,timeNameY
text: model.remainTime || 0,
fontWeight: style.Signal.text.fontWeight,
fontSize: 12,
@ -936,7 +946,9 @@ class Signal extends Group {
}
});
if (this.model.type === 'SHUNTING') {
this.sigName && this.sigName.setAnimationStart(this.style.Signal.text.defaultColor);
if (!this.style.Signal.dtTextNearSignalOffset) {
this.sigName && this.sigName.setAnimationStart(this.style.Signal.text.defaultColor);
}
}
}
setAshShow() {
@ -1070,6 +1082,8 @@ class Signal extends Group {
}
}
// model.remainTime = 26;
// this.setDelayUnlock();
if (model.remainTime) {
this.showRemainTime(model.remainTime);
} else {

View File

@ -30,90 +30,94 @@ export default class SignalButton extends Group {
const model = this.model;
const computedPosition = this.computedPosition;
const fillColor = this.getTypeColor();
const queryList = window.location.search.substring(1).split('&');
const queryCtc = queryList.find(item => {
return item.includes('ctc');
});
const ctcArcList = ['OCCLUSION', 'RECOVERY', 'CHANGE_DIRECTION', 'ACCIDENT', 'DEPART_ASSIST', 'PICK_ASSIST', 'ASSIST'];
const typeList = []
if (queryCtc && ctcArcList.includes(model.type)){
this.arcShape = new Arc({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 7,
r: 7
},
style: {
stroke: '#69666E',
lineWidth: 1,
fill: fillColor
}
});
this.add(this.arcShape);
} else if (this.style.SignalButton
&& this.style.SignalButton.shape === 'roundWithDock'
&& typeList.includes(model.type)) {
// const queryList = window.location.search.substring(1).split('&');
// const queryCtc = queryList.find(item => {
// return item.includes('ctc');
// });
// const ctcArcList = ['OCCLUSION', 'RECOVERY', 'CHANGE_DIRECTION', 'ACCIDENT', 'DEPART_ASSIST', 'PICK_ASSIST', 'ASSIST'];
const typeList = [];
// debugger;
// console.log(model.type);
// if (queryCtc && ctcArcList.includes(model.type)) {
// // debugger;
// this.arcShape = new Arc({
// zlevel: this.zlevel,
// z: this.z,
// shape: {
// cx: computedPosition.x + 7,
// cy: computedPosition.y + 7,
// r: 7
// },
// style: {
// stroke: '#69666E',
// lineWidth: 1,
// fill: fillColor
// }
// });
// this.add(this.arcShape);
// } else
if (this.style.SignalButton &&
this.style.SignalButton.shape === 'roundWithDock' &&
typeList.includes(model.type)) {
const circle1 = new Circle({
zlevel: this.zlevel,
z: this.z + 2,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 7,
r: 7
cx: computedPosition.x + 7,
cy: computedPosition.y + 7,
r: 7
},
style: {
stroke: '#69666E',
lineWidth: 1,
fill: fillColor
stroke: '#69666E',
lineWidth: 1,
fill: fillColor
}
})
});
const circle2 = new Circle({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 9,
r: 8
cx: computedPosition.x + 7,
cy: computedPosition.y + 9,
r: 8
},
style: {
fill: '#000'
fill: '#000'
}
})
});
const circle3 = new Circle({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 9,
r: 9
cx: computedPosition.x + 7,
cy: computedPosition.y + 9,
r: 9
},
style: {
fill: '#eee'
fill: '#eee'
}
})
this.arcShape = circle1
this.add(circle1).add(circle2).add(circle3)
});
this.arcShape = circle1;
this.add(circle1).add(circle2).add(circle3);
} else {
this.rectButton = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: model.position.x,
y: model.position.y,
width: 14,
height: 14
},
style: {
lineDash: null,
stroke: '#69666E',
lineWidth:1,
fill: fillColor
}
});
this.add(this.rectButton);
}
this.rectButton = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: computedPosition.x,
y: computedPosition.y,
width: 14,
height: 14
},
style: {
lineDash: null,
stroke: '#69666E',
lineWidth:1,
fill: fillColor
}
});
this.add(this.rectButton);
}
this.leftLine = new Line({
zlevel: this.zlevel,
z: this.z + 1,
@ -314,6 +318,9 @@ export default class SignalButton extends Group {
}
}
}
// let
// { value: 'PICK', label: '接车按钮' },
// { value: 'SHUNT_TERMINAL', label: '调车终端按钮' },
if (!store.getters['map/checkDeviceShow'](this._code)) {
this.buttonText && this.buttonText.hide();
this.rectButton && this.rectButton.hide();

View File

@ -103,10 +103,10 @@ export default class EThreeLamp extends Group {
this.add(this.text);
}
setColor(color) {
// if (color) {
// this.control.setStyle('fill', color);
// }
setColor(color, index) {
if (color && this['control' + index]) {
this['control' + index].setStyle('fill', color);
}
}
setTextColor(color) {

View File

@ -753,6 +753,7 @@ export default class Station extends Group {
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
this.stationControlCC && this.stationControlCC.setStyle({text:'LC', textFill:this.style.Station.StationControl.text.stationControlColor});
this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.lightColor);
this.selfDisciplineThree && this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.lightColor, 3);
// if (this.style.Station.StationControl.disPlayNone) {
// this.stationText && this.stationText.setStyle('textFill', '#fff');
// if (this.model.subheadDisplay) { // 副标题
@ -825,6 +826,7 @@ export default class Station extends Group {
this.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.defaultColor);
this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.defaultColor);
this.veryControlButton && this.veryControlButton.setStyle({ fill: this.style.Station.StationControl.veryControlButton.defaultColor });
this.selfDisciplineThree && this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.defaultColor, 3);
if (this.style.Station.stationText.isSpecialType) {
this.stationText.setColor(this.style.Station.stationText.noneModeColor);
this.stationText.setBackground(this.style.Station.stationText.defaultBackColor);

View File

@ -0,0 +1,49 @@
import Group from 'zrender/src/container/Group';
import Circle from 'zrender/src/graphic/shape/Circle';
class ESpecialCircle extends Group {
constructor(model) {
// drictx, dricty
super();
this.model = model;
this.dricty = model.dricty;
this.drictx = model.drictx > 0;
this.create();
}
create() {
const { model } = this;
this.specialCircle = new Circle({
zlevel: model.zlevel + 1,
z: model.z + 2,
shape: {
cx: model.point.x + (this.drictx ? 14 : -14),
cy: model.point.y,
r: 3
},
style: {
fill: '#FF0000'
}
});
this.add(this.specialCircle);
}
setColor(color) {
console.log(this.specialCircle);
console.log(color);
this.specialCircle.setStyle({ fill: color });
}
animate() {
this.specialCircle && this.specialCircle.animateStyle(true)
.when(0, { opacity: 1 })
.when(500, { opacity: 0 })
.when(1000, { opacity: 1 })
.start();
}
stopAnimation(flag) {
this.specialCircle.stopAnimation(flag);
}
}
export default ESpecialCircle;

View File

@ -16,7 +16,7 @@ class ESwName extends Group {
this.nameText = new Text({
zlevel: model.zlevel,
z: model.z + 6,
z: model.z + 11,
style: {
x: model.nameTextX,
y: model.nameTextY,
@ -92,6 +92,10 @@ class ESwName extends Group {
getTextRect() {
return this.textRect;
}
getBoundingRect() {
return this.textRect.getBoundingRect();
}
}
export default ESwName;

View File

@ -14,6 +14,7 @@ import EHighlight from '../element/EHighlight';
import ETriangle from './ETriangle';
import store from '@/store/index';
import ESwDot from './ESwDot';
import ESpecialCircle from './ESpecialCircle';
export default class Switch extends Group {
constructor(model, {style, mapDevice}) {
@ -221,6 +222,20 @@ export default class Switch extends Group {
this.add(this.dot);
}
if (style.Switch.core.specialCircle) {
// 大铁线路III型 定反位 实心小圆圈
const { drictx, dricty } = this.triangle;
this.specialCircle = new ESpecialCircle({
zlevel: this.zlevel,
z: this.z,
point:sectionAPoint,
drictx:drictx,
dricty:dricty
});
this.add(this.specialCircle);
this.specialCircle.hide();
}
this.add(this.shapeModelA);
this.add(this.shapeModelB);
this.add(this.shapeModelC);
@ -338,6 +353,7 @@ export default class Switch extends Group {
this.lockCircle && this.lockCircle.hide(); // 圆形包围框
this.lockArc && this.lockArc.hide(); // 圆形单锁框
this.name.getNameText().stopAnimation(false);
this.name.getTextRect().setStyle({ fill: this.style.backgroundColor });
this.shapeModelC && this.shapeModelC.hide(); // 形状 C
this.shapeModelA && this.shapeModelA.hide(); // 形状 A
this.shapeModelB && this.shapeModelB.hide(); // 形状 B
@ -353,6 +369,8 @@ export default class Switch extends Group {
this.name && this.name.show();
this.limitName && this.limitName.show();
this.dot && this.dot.hide();
this.specialCircle && this.specialCircle.hide();
this.specialCircle && this.specialCircle.stopAnimation(false);
}
/** 定位*/
@ -368,7 +386,13 @@ export default class Switch extends Group {
}
if (this.style.Switch.core.graphShow) { // 佛山线路显示
this.shapeModelB.show();
this.shapeModelB.setColor(this.style.Switch.core.graphLocalColor);
if (this.style.Switch.core.specialCircle) { // 大铁线路III型 定反位 实心小圆圈
this.specialCircle.show();
this.specialCircle.setColor(this.style.Switch.core.graphLocalColor);
} else {
this.shapeModelB.setColor(this.style.Switch.core.graphLocalColor);
}
this.shapeModelC.show();
this.shapeModelC.setColor(this.style.backgroundColor);
}
@ -388,7 +412,13 @@ export default class Switch extends Group {
this.shapeModelA.setColor(this.style.Section.line.spareColor);
if (this.style.Switch.core.graphShow) { // 佛山线路显示
this.shapeModelC.show();
this.shapeModelC.setColor(this.style.Switch.core.graphInversionColor);
if (this.style.Switch.core.specialCircle) { // 大铁线路III型 定反位 实心小圆圈
this.specialCircle.show();
this.specialCircle.setColor(this.style.Switch.core.graphInversionColor);
this.shapeModelC.setColor(this.style.Section.line.spareColor);
} else {
this.shapeModelC.setColor(this.style.Switch.core.graphInversionColor);
}
this.shapeModelC.attr({
z: this.z + 6
});
@ -436,6 +466,13 @@ export default class Switch extends Group {
this.setTextColor(this.style.Switch.text.lossColor);
this.style.Switch.text.faultFlashing && this.nameTextAnimation();
if (this.style.Switch.core.specialCircle) {
this.specialCircle.show();
this.specialCircle.setColor(this.style.Switch.core.lossActionColor);
// 大铁线路III型 定反位 实心小圆圈
this.specialCircle && this.specialCircle.animate();
}
this.lossShow && this.lossShow.show(); // 西安线路专有
this.lossShow && this.lossShow.animateStyle(true)
.when(0, { stroke: this.style.backgroundColor })
@ -464,30 +501,37 @@ export default class Switch extends Group {
if (this.style.Switch.jointImg.fork) {
this.recover();
this.shapeModelB.show();
this.shapeModelB.animateStyle(item => {
item.animateStyle(true)
.when(0, { stroke: this.style.backgroundColor })
.when(1000, { stroke: 'red' })
.when(2000, { stroke: this.style.backgroundColor })
.start();
});
this.shapeModelC.show(); // 宁波线路挤叉特殊显示
this.shapeModelC.animateStyle(item => {
item.animateStyle(true)
.when(0, { stroke: this.style.backgroundColor })
.when(1000, { stroke: 'red' })
.when(2000, { stroke: this.style.backgroundColor })
.start();
});
this.shapeModelA.show();
this.shapeModelA.animateStyle(item => {
item.animateStyle(true)
.when(0, { stroke: this.style.backgroundColor })
.when(1000, { stroke: 'red' })
.when(2000, { stroke: this.style.backgroundColor })
.start();
});
this.setTextColor('red');
if (this.style.Switch.core.specialCircle) {
this.specialCircle.show();
this.specialCircle.setColor(this.style.Switch.core.forkActionColor);
// 大铁线路III型 定反位 实心小圆圈
this.specialCircle && this.specialCircle.animate();
} else {
this.shapeModelB.animateStyle(item => {
item.animateStyle(true)
.when(0, { stroke: this.style.backgroundColor })
.when(1000, { stroke: 'red' })
.when(2000, { stroke: this.style.backgroundColor })
.start();
});
this.shapeModelC.animateStyle(item => {
item.animateStyle(true)
.when(0, { stroke: this.style.backgroundColor })
.when(1000, { stroke: 'red' })
.when(2000, { stroke: this.style.backgroundColor })
.start();
});
this.shapeModelA.animateStyle(item => {
item.animateStyle(true)
.when(0, { stroke: this.style.backgroundColor })
.when(1000, { stroke: 'red' })
.when(2000, { stroke: this.style.backgroundColor })
.start();
});
this.setTextColor('red');
}
} else {
this.setLossAction(fault); // 若不是具有特殊的挤岔,则显示状态和失表一样
}
@ -521,6 +565,45 @@ export default class Switch extends Group {
this.dot.setColor(this.style.Switch.switchDot.monoLockColor);
}
this.setTextColor(this.style.Switch.text.monolockLocationColor);
if (this.style.Switch.core.specialCircle) {
this.name.getTextRect().setStyle({ fill: this.style.Switch.text.lockTextBack });
}
}
// 引导总锁
guideMasterLock(pos) {
if (this.style.Switch.rectLock &&
this.style.Switch.rectLock.monolock) { // 判断单锁矩形是否显示
this.lockRect.show();
if (this.style.Switch.rectLock.rectBorderFillColor) { // 西安二号线 专用显示
this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.rectBorderColor, fill: this.style.Switch.rectLock.rectBorderFillColor });
}
}
if (this.style.Switch.text &&
this.style.Switch.text.monolock) { // 单锁显示名称包围框
this.setHasTextBorder(1);
}
if (this.style.Switch.arcBlcok &&
this.style.Switch.arcBlcok.show) { // 圆形单锁是否显示
this.lockArc.show();
if (pos == 'N') {
this.lockArc.setStyle({ stroke: this.style.Switch.arcBlcok.locationColor });
} else if (pos == 'R') {
this.lockArc.setStyle({ stroke: this.style.Switch.arcBlcok.inversionColor });
}
}
if (this.style.Switch.switchDot && this.style.Switch.switchDot.show) {
this.dot.show();
this.dot.setColor(this.style.Switch.switchDot.monoLockColor);
}
if (this.style.Switch.core.specialCircle) {
this.name.getTextRect().setStyle({ fill: this.style.backgroundColor });
this.setTextColor(this.style.Switch.text.guideMasterLockColor);
} else {
this.setTextColor(this.style.Switch.text.monolockLocationColor);
}
}
/** 封锁 */
@ -554,8 +637,12 @@ export default class Switch extends Group {
if (this.style.Switch.text.block) {
this.setHasTextBorder(1);
}
//
if (this.style.Switch.text.blockText) {
this.setTextColor(this.style.Switch.text.blockText);
if (this.style.Switch.core.specialCircle) {
this.name.getTextRect().setStyle({ fill: this.style.Switch.text.blockTextBack });
}
}
if (this.style.Switch.jointImg.trapezoidBlock) { // 范围且封锁时显示
if ( pos == 'N') {
@ -721,6 +808,8 @@ export default class Switch extends Group {
// model.pos == 'NO' || model.pos == 'EX';
// N-定位 R-反位 NO-无(失表) EX-挤叉
// model.pos = 'EX';
if (model.pos == 'N') {
this.switchPosition = 'normal';
this.setLocationAction(model); /** 定位*/
@ -742,9 +831,9 @@ export default class Switch extends Group {
this.setForkAction(model.fault); // 挤岔
}
model.isCiConfirm && this.setCiConfirm(); // 道岔使能显示
model.singleLock && this.setMonolock(model.pos); // 道岔单锁
model.guideMasterLock && this.setMonolock(model.pos); // 引导总锁
model.guideMasterLock && this.guideMasterLock(model.pos); // 引导总锁
// setMonolock(model.pos)
model.blockade && this.block(model.pos); // 道岔封锁
model.singleLock && model.blockade && this.blockMonolock(); // 单锁&锁闭状态
const path = window.location.href;
@ -790,10 +879,15 @@ export default class Switch extends Group {
this.setHasTextBorder(1, this.style.Switch.text.overlapLockBorderColor);
}
}
// 道岔侧防
handleFpLock() {
if (this.style.Switch.text.fpLockBorderColor) {
this.setHasTextBorder(1, this.style.Switch.text.fpLockBorderColor);
}
if (this.style.Switch.core.specialCircle) {
this.name.getTextRect().setStyle({ fill: this.style.backgroundColor });
this.setTextColor(this.style.Switch.text.fpLockColor);
}
}
getShapeTipPoint(opts) {
let rect;

View File

@ -201,12 +201,12 @@ export default {
{label: '计轴故障', value: 'FAULT'},
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}
];
} else if (selected._type === 'Section' && this.popClass === 'datie-02__systerm'){
this.faultList = [
{label: '计轴故障', value: 'FAULT'},
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}
];
} else if (selected._type === 'Switch' && this.popClass === 'haerbin-01__systerm') {
} else if (selected._type === 'Section' && this.popClass === 'datie-02__systerm') {
this.faultList = [
{label: '电路故障', value: 'FAULT'}
// {label: '', value: 'CBTC_OCCUPIED_FAULT'}
];
} else if (selected._type === 'Switch' && this.popClass === 'haerbin-01__systerm') {
this.faultList = [
{label: '失表', value: 'SPLIT'},
{label: '定位失表', value: 'NORMAL_SPLIT'},
@ -215,16 +215,16 @@ export default {
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'},
{label: '计轴故障', value: 'AXLE_FAULT'}
];
} else if(selected._type === 'Switch' && this.popClass === 'datie-02__systerm') {
this.faultList = [
{label: '失表', value: 'SPLIT'},
{label: '定位失表', value: 'NORMAL_SPLIT'},
{label: '反位失表', value: 'REVERSE_SPLIT'},
{label: '挤岔', value: 'SQUEEZE'},
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'},
{label: '红光带故障', value: 'AXLE_FAULT'}
];
} else if (selected._type === 'Section' && this.popClass === 'xian-01__systerm') {
} else if (selected._type === 'Switch' && this.popClass === 'datie-02__systerm') {
this.faultList = [
{label: '失表', value: 'SPLIT'},
{label: '定位失表', value: 'NORMAL_SPLIT'},
{label: '反位失表', value: 'REVERSE_SPLIT'},
// {label: '', value: 'SQUEEZE'},
// {label: '', value: 'CBTC_OCCUPIED_FAULT'},
{label: '电路故障', value: 'AXLE_FAULT'}
];
} else if (selected._type === 'Section' && this.popClass === 'xian-01__systerm') {
this.faultList = [
{label: '红光带故障', value: 'FAULT'},
{label: '粉光带故障', value: 'CBTC_OCCUPIED_FAULT'},

View File

@ -240,6 +240,16 @@ export const menuOperate = {
// 道岔钩锁
operation: OperationEvent.Switch.hookLock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK
},
defectiveShunting:{
// 设置分路不良
operation: OperationEvent.Switch.defectiveShunting.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_DEFECTIVE_SHUNTING
},
cancelDefectiveShunting:{
// 取消分路不良
operation: OperationEvent.Switch.cancelDefectiveShunting.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_CANCEL_DEFECTIVE_SHUNTING
}
},
StationStand:{

View File

@ -48,7 +48,7 @@
<div style="margin-right: 10px;">车站</div>
<el-select v-model="stationCode" size="mini" @change="stationChange">
<el-option
v-for="item in stationList"
v-for="item in showStationList"
:key="item.code"
:label="item.name"
:value="item.code"
@ -144,7 +144,8 @@ export default {
sheetList: [{ label: '历史进路', value: 'historyRoute' }],
sequenceList: [],
sequenceMap: {},
menu: [{label: '人工触发', handler: this.artificialTrigger, disabled: false}, {label: '删除', handler: this.artificialTrigger, disabled: true}]
menu: [{label: '人工触发', handler: this.artificialTrigger, disabled: false}, {label: '删除', handler: this.artificialTrigger, disabled: true}],
showStationList: []
};
},
computed: {
@ -186,23 +187,42 @@ export default {
}
}
}
},
'$store.state.map.showCentralizedStationCode': function (val) {
this.initShowStationList(val);
}
},
mounted() {
EventBus.$on('bottomTableShowOrHidden', () => {
this.showTable = !this.showTable;
});
if (this.stationList && this.stationList.length) {
this.stationCode = this.stationList[0].code;
}
// if (this.stationList && this.stationList.length) {
// this.stationCode = this.stationList[0].code;
// }
},
methods: {
doShow() {
this.initShowStationList(this.$store.state.map.showCentralizedStationCode);
this.showTable = true;
},
doClose() {
this.showTable = false;
},
initShowStationList(val) {
if (val) {
const centralizedStation = this.$store.getters['map/getDeviceByCode'](val);
const sn = centralizedStation.sn;
this.showStationList = [centralizedStation];
this.stationCode = centralizedStation.code;
this.stationList.forEach(station => {
if (station.sn === sn - 1) {
this.showStationList.unshift(station);
} else if (station.sn === sn + 1) {
this.showStationList.push(station);
}
});
}
},
getRouteStatus(status) {
if (status === '2') {
return '触发完成';

View File

@ -34,7 +34,8 @@ export default {
loading: false,
model:{
stationCode:'',
runPlanCode:''
runPlanCode:'',
status:1
}
};
},

View File

@ -59,11 +59,14 @@
<notice-info v-if="isCtc" ref="noticeInfo" pop-class="chengdou-03__systerm" />
<cmdManage v-if="isCtc" ref="cmdManage" />
<signedCmd v-if="isCtc" ref="signedCmd" @signedCmdClose="signedCmdClose" @changeSignedStatus="changeSignedStatus" />
<div id="playBtn" />
</div>
</template>
<script>
import { mapGetters, mapState } from 'vuex';
import { btts } from '@/utils/baidu_tts_cors';
import { getBaiduToken } from '@/api/voice';
import MenuSignal from './menuSignal';
import MenuButton from './menuButton';
import MenuStationStand from './menuStationStand';
@ -104,6 +107,7 @@ import CtcBarIcon17 from '@/assets/ctc_icon/pic17.png';
import CtcBarIcon18 from '@/assets/ctc_icon/pic18.png';
import cmdManage from '@/views/dispatcherStationManage/cmdManage.vue';
import signedCmd from '@/views/dispatcherStationManage/signedCmd.vue';
import {getRunplanInStation} from '@/api/runplan';
export default {
name: 'Menus',
@ -179,7 +183,9 @@ export default {
ctcBarIcon15: CtcBarIcon15,
ctcBarIcon16: CtcBarIcon16,
ctcBarIcon17: CtcBarIcon17,
ctcBarIcon18: CtcBarIcon18
ctcBarIcon18: CtcBarIcon18,
audio: null,
voiceBroadcastToken: ''
};
},
computed: {
@ -224,11 +230,28 @@ export default {
if (this.isCtc) {
this.getRailwaySimulationRunplanSend();
}
},
'$store.state.socket.voiceBroadcastChange': function() {
this.$store.state.socket.voiceBroadcastMsgs.forEach(msgCode => {
const msg = this.$store.state.socket.railCtcRunplanInitMsg[msgCode];
const station = this.$store.getters['map/getDeviceByCode'](msg.arriveRunPlan.stationCode);
const text = station.name + msg.arriveRunPlan.tripNumber + '次发车预告';
this.speechSynthesis(text);
});
}
// //
// '$store.state.map.mapViewLoadedCount': function (val) { //
// debugger;
// this.getRunplanInStationData();
// }
},
mounted() {
this.group = this.$route.query.group;
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
if (this.isCtc) {
this.getRunplanInStationData();
}
const _that = this;
window.onclick = function (e) {
if (!_that.$store.state.training.trainingStart) {
@ -248,6 +271,43 @@ export default {
this.$store.dispatch('map/setPictureDeviceMap', {});
},
methods: {
getRunplanInStationData() {
getRunplanInStation(this.group).then(response => {
// debugger;
this.$store.dispatch('socket/initRailCtcRunplanInitMsg', response.data || []);
}).catch(()=>{
});
},
async speechSynthesis(text) {
if (!this.voiceBroadcastToken) {
const resp = await getBaiduToken();
this.voiceBroadcastToken = resp.data;
}
const that = this;
//
// https://ai.baidu.com/docs#/TTS-API/41ac79a6
this.audio = btts({
tex: text,
tok: that.voiceBroadcastToken,
spd: 5,
pit: 5,
vol: 15,
per: 4
}, {
volume: 0.3,
autoDestory: true,
timeout: 10000,
hidden: false,
onInit: function (htmlAudioElement) {},
onSuccess: function(htmlAudioElement) {
this.audio = htmlAudioElement;
this.audio.play();
// playBtn.innerText = '';
},
onError: function(text) { that.$message.error(text); that.voiceBroadcastToken = ''; },
onTimeout: function () { that.$message.error('合成语音超时!'); }
});
},
changeSignedStatus(info) {
this.isCtc && this.$refs.cmdManage.changeSignedStatus(info);
},

View File

@ -66,7 +66,7 @@
<center><b></b><b></b></center>
</span>
</button>
<button :id="MixinCommand.functionButton.button.domId" class="button_box" @click="buttonDown(MixinCommand.functionButton.button.operation, ['StationStand', 'Station'])">
<button :id="MixinCommand.functionButton.button.domId" class="button_box" @click="buttonDown(MixinCommand.functionButton.button.operation, ['StationStand', 'Station','SignalButton'])">
<span :style="{color: operation === MixinCommand.functionButton.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center>
<center><b></b><b></b></center>
@ -254,6 +254,8 @@ export default {
this.updateButtonShow(val, old);
},
'$store.state.menuOperation.selectedCount': function (val) {
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (!station || station.controlMode === 'Interlock') { return; }
this.selectedChange();
},
'$store.state.map.clearButtonCount': function(val) {
@ -397,7 +399,7 @@ export default {
},
buttonDown(operation, commandTypeList) {
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station.controlMode === 'Interlock') { return; }
if (!station || station.controlMode === 'Interlock') { return; }
this.clearOperate();
if (operation != this.Command.cancel.clearMbm.operation) {
const operate = {
@ -671,6 +673,7 @@ export default {
// this.handleGuideLock(model);
// this.handleGuideSignal(model);
// } else
debugger;
if (buttonOperation && this.commandTypeList.includes(model._type)) {
if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
this.handelTotalCancel(model);
@ -689,22 +692,37 @@ export default {
this.arrangementRouteOperation(this.deviceList);
} else if (buttonOperation === this.Signal.guide.button.operation ) {
this.handleGuideSignal(model);
} else if (buttonOperation === this.MixinCommand.functionButton.button.operation) {
const signalButtonList = ['ASSIST', 'CHANGE_DIRECTION', 'PICK_ASSIST', 'DEPART_ASSIST', 'OCCLUSION', 'RECOVERY', 'ACCIDENT'];
if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) {
//
this.assistOperateOrChange(model);
}
} else {
this.clearOperate();
}
} else if (!buttonOperation) {
if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE' ) {
this.handleGuideSignal(model);
} else if (model._type === 'SignalButton' && model.type === 'CHANGE_DIRECTION') {
//
// this.changeDirection(model);
this.clearOperate();
} else if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) || (model._type === 'Signal' && !model.blockade)) {
this.deviceList.push(model);
this.arrangementRouteOperation(this.deviceList);
} else {
this.clearOperate();
}
// if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE' ) {
// this.handleGuideSignal(model);
// } else if (model._type === 'SignalButton' && model.type === 'CHANGE_DIRECTION') {
// //
// // this.changeDirection(model);
// this.clearOperate();
// } else if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) || (model._type === 'Signal' && !model.blockade)) {
// this.deviceList.push(model);
// this.arrangementRouteOperation(this.deviceList);
// } else {
// this.clearOperate();
// }
// if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE' ) {
// this.handleGuideSignal(model);
// } else if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) || (model._type === 'Signal' && !model.blockade)) {
// this.deviceList.push(model);
// this.arrangementRouteOperation(this.deviceList);
// } else {
// this.clearOperate();
// }
} else { this.clearOperate(); }
if (this.timeNode) { this.timeNode = 0; }
},
@ -789,6 +807,133 @@ export default {
},
commandClear() {
this.clearOperate();
},
assistOperateOrChange(model) {
// mode.type==
const modelTypeMap = {
//
'ASSIST':{
operation:this.CTCCommand.assistPressMainAssist.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_MAIN_ASSIST,
param:{
labelEnum:model.labelEnum,
stationCode:model.stationCode,
pressDown:model.pressDown ? 0 : 1 // 10
}
},
//
'CHANGE_DIRECTION':{
operation:this.CTCCommand.assistPressDownTurnDirection.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION,
param:{
labelEnum:model.labelEnum,
stationCode:model.stationCode,
pressDown:model.pressDown ? 0 : 1 // 10
}
},
//
'PICK_ASSIST':{
// this.CTCCommand.assistPressDownTurnDirection.menu.operation
operation:this.CTCCommand.assistPressReceiveAssist.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_RECEIVE_ASSIST,
param:{
labelEnum:model.labelEnum,
stationCode:model.stationCode
}
},
//
'DEPART_ASSIST':{
operation:this.CTCCommand.assistPressDeliverAssist.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_DELIVER_ASSIST,
param:{
labelEnum:model.labelEnum,
stationCode:model.stationCode
}
},
//
'ACCIDENT':{
operation:this.CTCCommand.assistPressAccident.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_ACCIDENT,
param:{
labelEnum:model.labelEnum,
stationCode:model.stationCode
}
}
};
const noPasswordModelTypeMap = {
//
'OCCLUSION':{
operation:this.CTCCommand.assistPressBlock.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_BLOCK,
param:{
labelEnum:model.labelEnum,
stationCode:model.stationCode
}
},
//
'RECOVERY':{
operation:this.CTCCommand.assistPressRestore.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_RESTORE,
param:{
labelEnum:model.labelEnum,
stationCode:model.stationCode
}
}
};
if (noPasswordModelTypeMap[model.type]) {
const operate = {
over:true,
operation: noPasswordModelTypeMap[model.type].operation,
code: model.code,
param: noPasswordModelTypeMap[model.type].param,
cmdType : noPasswordModelTypeMap[model.type].nextCmdType
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.clearOperate();
} else {
this.$refs.noticeInfo.doShow();
}
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
} else {
const operate = {
operation: modelTypeMap[model.type].operation,
code: model.code,
param: modelTypeMap[model.type].param
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
operate.nextCmdType = modelTypeMap[model.type].nextCmdType;
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
}
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
}
// const operate = {
// over: true,
// code: model.code,
// operation: this.CTCCommand.assistPressDownTurnDirection.menu.operation,
// cmdType: CMD.CTC.CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION,
// param: {
// labelEnum:model.labelEnum,
// stationCode:model.stationCode
// }
// };
// this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
// // this.clearOperate();
// }).catch((error) => {
// // this.clearOperate();
// console.error(error);
// this.$refs.noticeInfo.doShow();
// });
}
}
};

View File

@ -121,7 +121,6 @@ export default {
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
console.log(this.buttonOperation, '***********');
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && (!this.buttonOperation || this.$route.query.ctc)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
@ -146,7 +145,7 @@ export default {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station.controlMode === 'Interlock' && this.$route.query.ctc) {
if (station && station.controlMode === 'Interlock' && this.$route.query.ctc) {
this.menu.forEach(item => { item.disabled = true; });
} else { this.menu.forEach(item => { item.disabled = false; }); }
} else {

View File

@ -210,7 +210,7 @@ export default {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station.controlMode === 'Interlock' && this.$route.query.ctc) {
if (station && station.controlMode === 'Interlock' && this.$route.query.ctc) {
this.menu.forEach(item => { item.disabled = true; });
} else { this.menu.forEach(item => { item.disabled = false; }); }
//

View File

@ -200,7 +200,7 @@ export default {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station.controlMode === 'Interlock' && this.$route.query.ctc) {
if (station && station.controlMode === 'Interlock' && this.$route.query.ctc) {
this.menu.forEach(item => { item.disabled = true; });
} else { this.menu.forEach(item => { item.disabled = false; }); }
//

View File

@ -239,7 +239,7 @@ export default {
//
this.menu = MenuContextHandler.covert(this.menuNormal);
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station.controlMode === 'Interlock' && this.$route.query.ctc) {
if (station && station.controlMode === 'Interlock' && this.$route.query.ctc) {
this.menu.forEach(item => { item.disabled = true; });
} else { this.menu.forEach(item => { item.disabled = false; }); }
//

View File

@ -93,7 +93,7 @@
>
<template slot-scope="scope">
<div :class="scope.row.twinkle?'flashTrip noChange':'noChange'" style="color:#000">
{{ scope.row.tripNumber }} {{ scope.row.status==1?'(删)':scope.row.twinkle?'(*)':scope.row.keyTrains?'(重)':'' }}
{{ scope.row.tripNumber }} {{ scope.row.status==-1?'(删)':scope.row.twinkle?'(*)':scope.row.keyTrains?'(重)':'' }}
</div>
</template>
</el-table-column>
@ -652,6 +652,14 @@ export default {
const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
this.initDate(date);
},
'$store.state.training.roleDeviceCode':function(newVal, oldVal) {
if (oldVal) {
this.filterSectionList = this.sectionList.filter(section=>{
return section.standTrack && section.belongStation == newVal;
});
this.loadData();
}
},
'$store.state.socket.railCtcRunplanChange': function (val) {
this.loadData();
},
@ -721,6 +729,7 @@ export default {
loadData() {
this.tableData = [];
const railCtcRunplanInitMsg = copyAssign({}, this.$store.state.socket.railCtcRunplanInitMsg);
console.log(railCtcRunplanInitMsg, 'railCtcRunplanInitMsg');
this.tableData = Object.values(railCtcRunplanInitMsg).filter(data=>{
if (data.departRunPlan) {
// data.departRunPlan.planTime = this.coverTime(data.departRunPlan.planTime);
@ -822,8 +831,7 @@ export default {
};
commitOperate(menuOperate.CTC.setTransfinite, params, 3).then(({valid})=>{
this.loading = false;
if (valid) {
}
// if (valid) {}
}).catch(() => {
this.loading = false;
});
@ -839,8 +847,7 @@ export default {
};
commitOperate(menuOperate.CTC.modifyTrackSection, params, 3).then(({valid})=>{
this.loading = false;
if (valid) {
}
// if (valid) {}
}).catch(() => {
this.loading = false;
});
@ -869,8 +876,7 @@ export default {
// element.departRunPlan.sectionCode
commitOperate(menuOperate.CTC.modifyTrackSection, params, 3).then(({valid})=>{
this.loading = false;
if (valid) {
}
// if (valid) {}
}).catch(() => {
this.loading = false;
});

View File

@ -2,18 +2,23 @@
<div>
<pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<password-box ref="passwordBox" pop-class="chengdou-03__systerm" @checkOver="passWordCommit" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import PopMenu from '@/components/PopMenu';
// OperateMode
import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordInputBox';
import { DeviceMenu } from '@/scripts/ConstDic';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SignalMenu',
components: {
PopMenu,
PasswordBox,
NoticeInfo
},
props: {
@ -57,8 +62,13 @@ export default {
},
{
label: '加封',
handler: this.seal
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
handler: this.lock,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
},
{
label: '解封',
handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
}
]
}
@ -101,13 +111,44 @@ export default {
this.$refs.popMenu.resetShowPosition(point);
}
},
//
passWordCommit(data) {
let operate = {};
if (data.nextCmdType) {
operate = {
over: true,
operation: data.operateNext,
cmdType: data.nextCmdType
};
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
signalTotalCancle() {
const model = this.selected; //
commitOperate(menuOperate.Signal.signalTotalCancle, { signalCode: model._type === 'Signal' ? model.code : model.signalCode}, 3).then(({valid, operate}) => {
if (valid) {
//
}
});
},
//
humanTrainRoute() {
const model = this.selected; //
commitOperate(menuOperate.Signal.humanTrainRoute, { signalCode: model._type === 'Signal' ? model.code : model.signalCode}, 0).then(({valid, operate}) => {
if (valid) {
operate['operateNext'] = this.Command.close.password.operation;
operate['nextCmdType'] = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
this.$refs.passwordBox.doShow(operate);
}
});
},
//
signalRouteGuide() {
@ -118,8 +159,22 @@ export default {
},
//
seal() {
lock() {
const model = this.selected; //
commitOperate(menuOperate.Signal.lock, {signalCode: model._type === 'Signal' ? model.code : model.signalCode}, 3).then(({valid, operate}) => {
if (valid) {
//
}
});
},
//
unlock() {
const model = this.selected; //
commitOperate(menuOperate.Signal.unlock, {signalCode: model._type === 'Signal' ? model.code : model.signalCode}, 3).then(({valid, operate}) => {
if (valid) {
//
}
});
},
doClose() {
if (this.$refs && this.$refs.popMenu) {

View File

@ -1,7 +1,7 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<switch-control ref="switchControl" pop-class="chengdou-03__systerm" />
<!-- <switch-control ref="switchControl" pop-class="chengdou-03__systerm" /> -->
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</div>
</template>
@ -12,13 +12,13 @@ import { DeviceMenu } from '@/scripts/ConstDic';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
// import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
export default {
name: 'SwitchMenu',
components: {
PopMenu,
SwitchControl,
// SwitchControl,
NoticeInfo
},
props: {
@ -69,8 +69,27 @@ export default {
label: '解封',
handler: this.unblock,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
},
{
type: 'separator'
},
{
label: '设置分路不良标记',
handler: this.defectiveShunting,
cmdType: CMD.Switch.CMD_SWITCH_DEFECTIVE_SHUNTING
},
//
{
label: '取消分路不良标记',
handler: this.cancelDefectiveShunting,
cmdType: CMD.Switch.CMD_SWITCH_CANCEL_DEFECTIVE_SHUNTING
},
//
{
label: '区段故障解锁',
handler: this.fault,
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
}
],
Center: [
]
@ -89,53 +108,78 @@ export default {
methods:{
//
locate() {
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 3).then(({valid, operate})=>{
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
// this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
reverse() {
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 3).then(({valid, operate})=>{
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
// this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
lock() {
commitOperate(menuOperate.Switch.lock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
commitOperate(menuOperate.Switch.lock, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
// this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
//
unlock() {
commitOperate(menuOperate.Switch.unlock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
commitOperate(menuOperate.Switch.unlock, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
// this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
block() {
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
// this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
unblock() {
commitOperate(menuOperate.Switch.unblock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
commitOperate(menuOperate.Switch.unblock, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
// this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
// /
fault() {
commitOperate(menuOperate.Switch.fault, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
if (valid) {
// this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
defectiveShunting() {
commitOperate(menuOperate.Switch.defectiveShunting, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
if (valid) {
// this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
cancelDefectiveShunting() {
commitOperate(menuOperate.Switch.cancelDefectiveShunting, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
if (valid) {
// this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
doShow(point) {
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {

View File

@ -45,7 +45,11 @@ export default {
/** 引导总锁 */
CMD_SWITCH_MASTER_LOCK: {value:'Switch_Master_Lock', label: '设置引导总锁' },
/** 取消引导总锁 */
CMD_SWITCH_MASTER_UNBLOCK: {value: 'Switch_Master_Unblock', label: '取消引导总锁'}
CMD_SWITCH_MASTER_UNBLOCK: {value: 'Switch_Master_Unblock', label: '取消引导总锁'},
/** 道岔设置分路不良 */
CMD_SWITCH_DEFECTIVE_SHUNTING: {value: 'Switch_Defective_Shunting', label: '道岔设置分路不良'},
/** 道岔取消分路不良 */
CMD_SWITCH_CANCEL_DEFECTIVE_SHUNTING: {value: 'Switch_Cancel_Defective_Shunting', label: '道岔取消分路不良'}
},
// 控制模式操作

View File

@ -1162,6 +1162,20 @@ export const OperationEvent = {
operation: '11b1',
domId: '_Tips-Switch-ForceCancelSpeed-Menu{BOTTOM}'
}
},
// 设置分路不良
defectiveShunting:{
menu: {
operation: '11c',
domId: '_Tips-Switch-DefectiveShunting-Menu{TOP}'
}
},
// 取消分路不良
cancelDefectiveShunting:{
menu: {
operation: '11d',
domId: '_Tips-Switch-CancelDefectiveShunting-Menu{TOP}'
}
}
},

View File

@ -203,18 +203,19 @@ function handle(state, data) {
state.railCtcStatusMsg = msg;
break;
// 大铁项目 ctc 运行图初始化信息
case 'SIMULATION_CTC_RUN_PLAN_INIT':
msg.forEach(element => {
const tripNumberDe = element.departRunPlan && element.departRunPlan.tripNumber;
const tripNumberAr = element.arriveRunPlan && element.arriveRunPlan.tripNumber;
if (tripNumberDe) { parseInt(tripNumberDe[tripNumberDe.length - 1]) % 2 == 0 ? element.departRunPlan.up = tripNumberDe : element.departRunPlan.down = tripNumberDe; }
if (tripNumberAr) { parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr; }
const code = element.stationCode + '' + element.code;
state.railCtcRunplanInitMsg[code] = element;
});
break;
// case 'SIMULATION_CTC_RUN_PLAN_INIT':
// msg.forEach(element => {
// const tripNumberDe = element.departRunPlan && element.departRunPlan.tripNumber;
// const tripNumberAr = element.arriveRunPlan && element.arriveRunPlan.tripNumber;
// if (tripNumberDe) { parseInt(tripNumberDe[tripNumberDe.length - 1]) % 2 == 0 ? element.departRunPlan.up = tripNumberDe : element.departRunPlan.down = tripNumberDe; }
// if (tripNumberAr) { parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr; }
// const code = element.stationCode + '' + element.code;
// state.railCtcRunplanInitMsg[code] = element;
// });
// break;
// 大铁项目 ctc 运行图改变信息
case 'SIMULATION_CTC_RUN_PLAN_CHANGE':
state.voiceBroadcastMsgs = [];
msg.forEach(element => {
const tripNumberDe = element.departRunPlan && element.departRunPlan.tripNumber;
const tripNumberAr = element.arriveRunPlan && element.arriveRunPlan.tripNumber;
@ -229,8 +230,14 @@ function handle(state, data) {
parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr;
}
const code = element.stationCode + '' + element.code;
if (store.state.training.roleDeviceCode === element.stationCode && element.arriveRunPlan && element.arriveRunPlan.adjacentMessage === '1') {
state.voiceBroadcastMsgs.push(element.stationCode + '' + element.code);
}
state.railCtcRunplanInitMsg[code] = copyAssign(state.railCtcRunplanInitMsg[code] || {}, element);
});
if (state.voiceBroadcastMsgs.length) {
state.voiceBroadcastChange++;
}
state.railCtcRunplanChange++;
break;
// 大铁项目 ctc 调度发布行车计划 给车站下发消息
@ -460,7 +467,9 @@ const socket = {
railCtcStationManageRpMsg:{}, // 大铁项目 ctc 车务管理 端运行图信息
railCtcStationManageRpChange:0, // 大铁项目 ctc 车务管理 运行图信息变化
railwaySimulationRunplanSendMap:{}, // 大铁项目 调度台 发布 行车计划
railwaySimulationRunplanSendChange:0 // 大铁项目 调度台 发布 行车计划变化
railwaySimulationRunplanSendChange:0, // 大铁项目 调度台 发布 行车计划变化
voiceBroadcastMsgs: [], // 语音播报信息
voiceBroadcastChange: 0 // 语音播报信息变化
// railwaySimulationRpMsg:{}, // 大铁项目 调度台 调度台
// railwaySimulationRpChange:0 // 大铁项目 调度台 运行图信息变化
},
@ -558,6 +567,16 @@ const socket = {
},
resetRailCtcRunplanInitMsg: (state) => {
state.railCtcRunplanInitMsg = {};
},
initRailCtcRunplanInitMsg: (state, list) => {
list.forEach(element => {
const tripNumberDe = element.departRunPlan && element.departRunPlan.tripNumber;
const tripNumberAr = element.arriveRunPlan && element.arriveRunPlan.tripNumber;
if (tripNumberDe) { parseInt(tripNumberDe[tripNumberDe.length - 1]) % 2 == 0 ? element.departRunPlan.up = tripNumberDe : element.departRunPlan.down = tripNumberDe; }
if (tripNumberAr) { parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr; }
const code = element.stationCode + '' + element.code;
state.railCtcRunplanInitMsg[code] = element;
});
}
},
@ -658,6 +677,9 @@ const socket = {
},
resetRailCtcRunplanInitMsg:({ commit }) => {
commit('resetRailCtcRunplanInitMsg');
},
initRailCtcRunplanInitMsg:({ commit }, list) => {
commit('initRailCtcRunplanInitMsg', list);
}
}
};

118
src/utils/baidu_tts_cors.js Normal file
View File

@ -0,0 +1,118 @@
/**
* 浏览器调用语音合成接口
* @param {Object} param 百度语音合成接口参数
* 请参考 https://ai.baidu.com/docs#/TTS-API/41ac79a6
* @param {Object} options 跨域调用api参数
* timeout {number} 超时时间 默认不设置为60秒
* volume {number} audio控件音量范围 0-1
* hidden {boolean} 是否隐藏audio控件
* autoDestory {boolean} 播放音频完毕后是否自动删除控件
* onInit {Function} 创建完audio控件后调用
* onSuccess {Function} 远程语音合成完成并且返回音频文件后调用
* onError {Function} 远程语音合成完成并且返回错误字符串后调用
* onTimeout {Function} 超时后调用默认超时时间为60秒
*/
export function btts(param, options) {
var url = process.env.NODE_ENV === 'development' ? 'http://tsn.baidu.com/text2audio' : 'https://tsn.baidu.com/text2audio';
var opt = options || {};
var p = param || {};
// 如果浏览器支持可以设置autoplay但是不能兼容所有浏览器
var audio = document.createElement('audio');
if (opt.autoplay) {
audio.setAttribute('autoplay', 'autoplay');
}
// 隐藏控制栏
if (!opt.hidden) {
audio.setAttribute('controls', 'controls');
} else {
audio.style.display = 'none';
}
// 设置音量
if (typeof opt.volume !== 'undefined') {
audio.volume = opt.volume;
}
// 调用onInit回调
isFunction(opt.onInit) && opt.onInit(audio);
// 默认超时时间60秒
var DEFAULT_TIMEOUT = 60000;
var timeout = opt.timeout || DEFAULT_TIMEOUT;
// 创建XMLHttpRequest对象
var xhr = new XMLHttpRequest();
xhr.open('POST', url);
// 创建form参数
var data = {};
for (var p in param) {
data[p] = param[p];
}
// 赋值预定义参数
data.cuid = data.cuid || data.tok;
data.ctp = 1;
data.lan = data.lan || 'zh';
data.aue = data.aue || 3;
// 序列化参数列表
var fd = [];
for (var k in data) {
fd.push(k + '=' + encodeURIComponent(data[k]));
}
// 用来处理blob数据
var frd = new FileReader();
xhr.responseType = 'blob';
xhr.send(fd.join('&'));
// 用timeout可以更兼容的处理兼容超时
var timer = setTimeout(function() {
xhr.abort();
isFunction(opt.onTimeout) && opt.onTimeout();
}, timeout);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
clearTimeout(timer);
if (xhr.status == 200) {
if (xhr.response.type === 'audio/mp3') {
// 在body元素下apppend音频控件
document.body.appendChild(audio);
audio.setAttribute('src', URL.createObjectURL(xhr.response));
// autoDestory设置则播放完后移除audio的dom对象
if (opt.autoDestory) {
audio.onended = function() {
document.body.removeChild(audio);
};
}
isFunction(opt.onSuccess) && opt.onSuccess(audio);
}
// 用来处理错误
if (xhr.response.type === 'application/json') {
frd.onload = function() {
var text = frd.result;
isFunction(opt.onError) && opt.onError(text);
};
frd.readAsText(xhr.response);
}
}
}
};
// 判断是否是函数
function isFunction(obj) {
if (Object.prototype.toString.call(obj) === '[object Function]') {
return true;
}
return false;
}
}

View File

@ -150,7 +150,87 @@
</el-tab-pane>
<el-tab-pane label="查询" name="search">
<div class="search-box">
<div>查询</div>
<div class="box-title">
<div class="contant-null" />
<div class="contant-text">查询条件</div>
<div class="contant-icon" @click="active5=!active5">
<i v-if="active1" class="el-icon-arrow-down" />
<i v-else class="el-icon-arrow-up" />
</div>
</div>
<div v-show="active5" class="search-condition">
<div class="condition-top">
<el-radio v-model="searchObj.timeType" label="1">时间范围</el-radio>
<el-radio v-model="searchObj.timeType" label="2">精确匹配发令时间</el-radio>
</div>
<div class="condition-border" style="padding: 5px 10px">
<div v-if="searchObj.timeType==1">
<div class="condition-row">
<span style="margin-right: 5px"></span>
<el-date-picker v-model="searchObj.startTime" style="flex: 1" type="datetime" placeholder="选择日期时间" value-format="yyyy-MM-dd HH:mm:ss" />
</div>
<div class="condition-row">
<span style="margin-right: 5px"></span>
<el-date-picker v-model="searchObj.endTime" style="flex: 1" type="datetime" placeholder="选择日期时间" value-format="yyyy-MM-dd HH:mm:ss" />
</div>
</div>
<div v-else class="condition-row">
<span style="margin-right: 5px">发令时间</span>
<el-date-picker v-model="searchObj.sendTime" style="flex: 1" type="datetime" placeholder="选择日期时间" value-format="yyyy-MM-dd HH:mm:ss" />
</div>
</div>
<div class="condition-row">
<el-checkbox v-model="searchObj.hasNumber">命令号</el-checkbox>
<el-input v-model="searchObj.number" />
</div>
<div class="condition-border">
<div class="condition-row">
<el-checkbox v-model="searchObj.hasCompanyOfSender">发令单位</el-checkbox>
<el-input v-model="searchObj.companyOfSender" />
</div>
<div class="condition-row">
<el-checkbox v-model="searchObj.hasCompanyOfReceiver">受令单位</el-checkbox>
<el-input v-model="searchObj.companyOfReceiver" />
</div>
<div>
<el-checkbox v-model="searchObj.hasTitleKey">命令标题或者内容 关键字</el-checkbox>
<el-input v-model="searchObj.titleKey" />
</div>
<div>
<el-select v-model="searchObj.allSigned" placeholder="请选择">
<el-option
v-for="item in searchSignedOption"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</div>
<div class="condition-btn">
<el-button type="primary" @click="search">查询</el-button>
<el-button type="primary" style="width: 100px" @click="clearCondition">清除</el-button>
</div>
</div>
<el-table ref="table5" class="search-table" :data="searchTable" border style="width: 100%" height="100%" highlight-current-row @current-change="handleCurrentChange($event, 'table5')">
<el-table-column prop="number" label="命令号" width="80" />
<el-table-column prop="transferNumber" label="识别号" width="80" />
<el-table-column prop="title" label="命令标题" show-overflow-tooltip />
<el-table-column prop="sendTime" label="接收单位" show-overflow-tooltip width="160">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="sendTime" label="发令时间" width="160" />
<el-table-column prop="senderName" label="发令人" />
<el-table-column prop="companyOfSender" label="发令单位" />
<el-table-column label="命令类型" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="content" label="命令正文" show-overflow-tooltip />
</el-table>
</div>
</el-tab-pane>
</el-tabs>
@ -337,8 +417,8 @@ export default {
author: '',
receiverIds: [],
type: 'NORMAL',
content: '',
allSigned: ''
content: ''
// allSigned: ''
},
rules: {
title: [
@ -356,10 +436,33 @@ export default {
active2: true,
active3: true,
active4: true,
active5: true,
timeTypeRadio: '1',
numTime: 24,
seachData: [],
cacheTableData: [],
currentInfo: {}
currentInfo: {},
searchObj: {
timeType: '1',
startTime: '',
endTime: '',
sendTime: '',
hasNumber: false,
number: '',
hasCompanyOfSender: false,
companyOfSender: '',
hasCompanyOfReceiver: false,
companyOfReceiver: '',
hasTitleKey: false,
titleKey: '',
allSigned: ''
},
searchTable: [],
searchSignedOption: [
{ value: '', label: '全部'},
{ value: true, label: '只显示签收完成的'},
{ value: false, label: '只显示未签收完成的'}
]
};
},
computed: {
@ -462,8 +565,67 @@ export default {
beforeDestroy() {},
mounted() {},
methods:{
search() {
this.searchTable = [];
this.searchCmd().then(res => {
this.getSearchTable();
});
},
getSearchTable() {
const list = this.seachData.filter(item => {
return this.conditionFilter(item);
});
this.searchTable = list;
},
conditionFilter(item) {
let status = true;
if (this.searchObj.timeType == '1') {
if (this.searchObj.startTime && new Date(this.searchObj.startTime).getTime() > new Date(item.sendTime).getTime()) {
status = false;
}
if (this.searchObj.endTime && new Date(this.searchObj.endTime).getTime() < new Date(item.sendTime).getTime()) {
status = false;
}
}
if (this.searchObj.timeType == '2' && this.searchObj.sendTime) {
if (this.searchObj.sendTime != item.sendTime) {
status = false;
}
}
if (this.searchObj.hasNumber && this.searchObj.number) {
if (this.searchObj.number != item.number) {
status = false;
}
}
if (this.searchObj.hasCompanyOfSender && this.searchObj.companyOfSender) {
if (this.searchObj.companyOfSender != item.companyOfSender) {
status = false;
}
}
if (this.searchObj.hasCompanyOfReceiver && this.searchObj.companyOfReceiver) {
const findObj = Object.keys(item.receiverInfos).find(ii => {
const device = this.$store.getters['map/getDeviceByCode'](ii);
const name = device ? device.name : '';
return name == this.searchObj.companyOfReceiver;
});
if (!findObj) {
status = false;
}
}
if (this.searchObj.hasTitleKey && this.searchObj.titleKey) {
if (!item.title.includes(this.searchObj.titleKey) && !item.content.includes(this.searchObj.titleKey)) {
status = false;
}
}
if (this.searchObj.allSigned != '') {
if (this.searchObj.allSigned != item.allSigned) {
status = false;
}
}
return status;
},
setCurrentRow(obj, refName) {
const tableArr = ['table1', 'table2', 'table3', 'table4'];
const tableArr = ['table1', 'table2', 'table3', 'table4', 'table5'];
tableArr.forEach(key => {
if (key != refName) {
this.$refs[key] && this.$refs[key].setCurrentRow();
@ -475,7 +637,10 @@ export default {
handleCurrentChange(obj, refName) {
if (!obj) { return; }
this.currentInfo = obj;
this.command = {...obj};
// this.command = {...obj};
Object.keys(this.command).forEach(key => {
this.command[key] = obj[key] || '';
});
this.setCurrentRow(obj, refName);
const infoList = Object.keys(this.currentInfo.receiverInfos || {});
if (infoList.length) {
@ -525,6 +690,24 @@ export default {
console.log('刷新');
this.searchCmd();
},
clearCondition() {
this.searchTable = [];
this.searchObj = {
timeType: '1',
startTime: '',
endTime: '',
sendTime: '',
hasNumber: false,
number: '',
hasCompanyOfSender: false,
companyOfSender: '',
hasCompanyOfReceiver: false,
companyOfReceiver: '',
hasTitleKey: false,
titleKey: '',
allSigned: ''
};
},
createCmd() {
this.$confirm('当前调度命令已经被编辑修改过了,你要放弃所有的修改吗?', '操作提示', {
confirmButtonText: '是',
@ -551,8 +734,8 @@ export default {
author: '',
receiverIds: [],
type: 'NORMAL',
content: '',
allSigned: ''
content: ''
// allSigned: ''
};
this.currentInfo = {};
this.$refs.table && this.$refs.table.clearSelection();
@ -639,11 +822,15 @@ export default {
});
},
searchCmd() {
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
console.log(res, '---res----');
this.seachData = res.data;
}).catch(error => {
this.$messageBox('查询调度命令失败:' + error.message);
return new Promise((resolve, reject) => {
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
console.log(res, '---res----');
this.seachData = res.data;
resolve();
}).catch(error => {
this.$messageBox('查询调度命令失败:' + error.message);
reject(error.message);
});
});
}
}
@ -687,12 +874,49 @@ export default {
color: blue;
}
}
.search-box {
height: 720px;
display: flex;
flex-direction: column;
justify-content: center;
.search-condition {
padding: 5px;
.condition-top {
padding: 5px;
}
.condition-btn {
padding: 10px;
text-align: center;
}
}
.search-table {
flex: 1;
}
.condition-border {
margin: 10px 0;
padding: 5px;
border: 1px solid #92ACD7;
div {
margin: 5px 0;
}
}
.condition-row {
display: flex;
justify-content: space-between;
align-items: center;
height: 32px;
line-height: 32px;
}
.el-checkbox {
margin-right: 5px;
}
}
}
/deep/ .el-tabs__item {
height: 30px !important;
line-height: 30px !important;
}
.middle {
.middle, .left {
/deep/ .el-form-item {
margin-bottom: 0px;
.el-form-item__error {
@ -720,4 +944,7 @@ export default {
.dispatcher-cmd .el-dialog {
margin-top: 8vh !important;
}
.dispatcher-cmd .el-tabs--border-card>.el-tabs__content {
padding: 5px !important;
}
</style>

View File

@ -12,7 +12,7 @@
<div style="height: 500px; overflow-y: auto;background: #DFE3E6;padding: 7px;">
<div style="width: 100%;display: flex;align-items: center;margin-bottom: 10px;">
<div
v-for="item in stationList"
v-for="item in showStationList"
:key="item.code"
class="tab-box"
:style="{background: selectCode === item.code ? '#F1F1F1': '#DBDBDB', color: selectCode === item.code ? '#000': '#ccc'}"
@ -214,7 +214,7 @@
</el-table>
<div style="width: 100%;display: flex;align-items: center;margin: 5px 0;">
<div
v-for="item in stationList"
v-for="item in showStationList"
:key="item.code"
class="tab-box"
:style="{background: selectCode1 === item.code ? '#F1F1F1': '#DBDBDB', color: selectCode1 === item.code ? '#000': '#ccc'}"
@ -335,7 +335,8 @@ export default {
sequenceList: [],
readOnlyMap: {},
standTrackSectionMap: {},
trackList: []
trackList: [],
showStationList: []
};
},
computed: {
@ -436,6 +437,9 @@ export default {
this.standTrackSectionMap[item.code] = { trackName: item.name, occupied: false, belongStation:item.belongStation, lineMap: {}};
}
});
},
'$store.state.map.showCentralizedStationCode': function (val) {
this.initShowStationList(val);
}
},
mounted() {
@ -444,11 +448,26 @@ export default {
handleClose() {
this.dialogVisible = false;
},
initShowStationList(val) {
if (val) {
const centralizedStation = this.$store.getters['map/getDeviceByCode'](val);
const sn = centralizedStation.sn;
this.showStationList = [centralizedStation];
this.stationList.forEach(station => {
if (station.sn === sn - 1) {
this.showStationList.unshift(station);
} else if (station.sn === sn + 1) {
this.showStationList.push(station);
}
});
}
},
doShow() {
this.dialogVisible = true;
if (this.stationList[0]) {
this.selectStandCode(this.stationList[0].code);
this.selectStandCode1(this.stationList[0].code);
this.initShowStationList(this.$store.state.map.showCentralizedStationCode);
if (this.showStationList && this.showStationList.length) {
this.selectStandCode(this.$store.state.map.showCentralizedStationCode);
this.selectStandCode1(this.$store.state.map.showCentralizedStationCode);
}
},
selectStandCode(code) {

View File

@ -1,7 +1,7 @@
<template>
<div>
<div class="schema" :style="{top: offset+'px'}">
<select-station v-if="isShowSelectStation && !isScript" ref="selectStation" :style-css="'width: 100px;'" />
<select-station v-show="!$route.query.joint" v-if="isShowSelectStation && !isScript" ref="selectStation" :style-css="'width: 100px;'" />
<el-select v-model="speed" style="width: 100px;" size="small" @change="speedChange">
<el-option
v-for="item in speedList"
@ -12,7 +12,7 @@
</el-select>
<template v-if="!dataError">
<el-button-group v-if="project !== 'bjd'">
<el-button v-if="$route.query.lineCode === '16'&&!isCtc && project !== 'teaching'" size="small" @click="goCtc">CTC</el-button>
<el-button v-if="$route.query.lineCode === '16'&&!isCtc && project !== 'teaching'" size="small" @click="goCtc">车务终端</el-button>
<!-- <el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goRpManage">管理终端</el-button> -->
<!-- <el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goDsManage">调度台</el-button> -->
<el-button v-if="isLocalStation && $route.query.lineCode!='08' && $route.query.lineCode!='16' && project !== 'teaching'" size="small" @click="goIbp">IBP盘</el-button>

View File

@ -43,6 +43,11 @@ export default {
},
'$store.state.training.simulationUserList': function(val) {
this.initData();
},
'$store.state.socket.simulationRoleList':function(list) {
if (list && list.length) { //
this.checkRoleChange(list);
}
}
},
mounted() {
@ -128,6 +133,27 @@ export default {
if (this.showMemberId) {
this.switchStationMode( this.showMemberId);
}
},
checkRoleChange(data) {
data.forEach(item => {
if (item.messageType === 'KICK_OUT' && item.userId == this.$store.state.user.id) {
this.$messageBox('您已经被请离房间!');
window.close();
} else if (item.messageType === 'PLAY_CHANGE' && item.userId == this.$store.state.user.id && item.type === 'STATION_SUPERVISOR') {
this.showMemberId = item.memberId;
this.oldShowMemberId = item.memberId;
this.showStation = item.deviceCode;
const showStationCode = this.stationCentralizedMap[item.deviceCode];
const mapDevice = this.$store.state.map.mapDevice;
const list = [];
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
this.$jlmap.updateShowStation(list, showStationCode || item.deviceCode);
this.setCenter(showStationCode);
}
});
}
}
};

View File

@ -265,6 +265,7 @@ export default {
mapId:this.$route.query.mapId,
project: this.project,
newApi: false,
joint: true,
ctc: true,
try: this.$route.query.try || 0,
token:getToken(),

View File

@ -12,6 +12,7 @@
<el-form-item label="画面类型:" prop="type">
<el-select v-model="ruleForm.type" placeholder="请选择画面类型">
<el-option label="站间透明" value="lucency" />
<el-option label="连锁车站" value="chainStation" />
</el-select>
</el-form-item>
<el-form-item label="所属车站:" prop="stationCode">

View File

@ -69,6 +69,10 @@ export default {
}
},
methods: {
reloadMenuComponent(lineCode) {
this.menus = this.$theme.loadMenuComponent(lineCode); // menu
this.$store.commit('training/notifyGetCommandDefinition', lineCode); // 线
},
//
getDeviceByEm(em) {
var device = this.$store.getters['map/getDeviceByCode'](em.deviceCode) || null;
@ -196,13 +200,13 @@ export default {
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
}
} else if (this.$route.query.ctc) {
this.$store.dispatch('menuOperation/setSelected', {device: this.selected, subType: em.subType});
menu = getDeviceMenuByDeviceType(device._type);
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
}
this.$store.dispatch('menuOperation/setSelected', {device: this.selected, subType: em.subType});
menu = getDeviceMenuByDeviceType(device._type);
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
}
} else {
menu = getDeviceMenuByDeviceType('Cancel');
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
}
this.$store.dispatch('training/emitTipFresh');
},

View File

@ -1,285 +1,278 @@
<template>
<div class="BigRouteInfo">
<el-form ref="form" :model="addModel" :rules="rules" label-width="140px" size="mini" class="bigDefinition">
<el-form-item v-if="isModify" label="编号:" prop="code">
<el-input v-model="addModel.code" style="width: 220px;" disabled />
</el-form-item>
<el-form-item label="名称:" prop="name">
<el-input v-model="addModel.name" style="width: 220px;" />
</el-form-item>
<el-form-item label="关联车站:" prop="stationCode">
<el-select v-model="addModel.stationCode" clearable filterable>
<el-option
v-for="item in stationList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'stationCode' ? 'danger' : 'primary'"
@click="hover('stationCode')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="运行方向" prop="labelEnum">
<el-select v-model="addModel.labelEnum">
<el-option
v-for="item in directionLabelList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="关联区段:" prop="sectionList">
<el-select v-model="addModel.sectionList" multiple :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in sectionList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'sectionList' ? 'danger' : 'primary'"
@click="hover('sectionList')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="关联信号机:" prop="signalCode">
<el-select v-model="addModel.signalCode" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in signalList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button :type="field === 'signalCode'? 'danger':'primary'" @click="hover('signalCode')">{{$t('map.activate')}}</el-button>
</el-form-item>
<el-form-item label="闭塞类型:" prop="runModel">
<el-select v-model="addModel.runModel" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in runModelList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="默认状态:" prop="runStatus">
<el-select v-model="addModel.runStatus" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in runStatusList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="相对运行车站:" prop="relativeStationCode">
<el-select v-model="addModel.relativeStationCode" clearable filterable>
<el-option
v-for="item in stationList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'relativeStationCode' ? 'danger' : 'primary'"
@click="hover('relativeStationCode')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="相对运行方向:" prop="relativeLabelEnum">
<el-select v-model="addModel.relativeLabelEnum">
<el-option
v-for="item in directionLabelList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<div class="bigDraft">
<el-button-group class="bigDraftBtn">
<el-button v-if="isModify" type="warning" size="small" :loading="loading" @click="update ">更新</el-button>
<el-button v-else type="primary" size="small" :loading="loading" @click="save">保存</el-button>
</el-button-group>
</div>
</div>
<div class="BigRouteInfo">
<el-form ref="form" :model="addModel" :rules="rules" label-width="140px" size="mini" class="bigDefinition">
<el-form-item v-if="isModify" label="编号:" prop="code">
<el-input v-model="addModel.code" style="width: 220px;" disabled />
</el-form-item>
<el-form-item label="名称:" prop="name">
<el-input v-model="addModel.name" style="width: 220px;" />
</el-form-item>
<el-form-item label="关联车站:" prop="stationCode">
<el-select v-model="addModel.stationCode" clearable filterable>
<el-option
v-for="item in stationList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'stationCode' ? 'danger' : 'primary'"
@click="hover('stationCode')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="运行方向" prop="labelEnum">
<el-select v-model="addModel.labelEnum">
<el-option
v-for="item in directionLabelList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="关联区段:" prop="sectionList">
<el-select v-model="addModel.sectionList" multiple :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in sectionList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'sectionList' ? 'danger' : 'primary'"
@click="hover('sectionList')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="关联信号机:" prop="signalCode">
<el-select v-model="addModel.signalCode" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in signalList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button :type="field === 'signalCode'? 'danger':'primary'" @click="hover('signalCode')">{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="闭塞类型:" prop="runModel">
<el-select v-model="addModel.runModel" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in runModelList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="默认状态:" prop="runStatus">
<el-select v-model="addModel.runStatus" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in runStatusList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="相对运行车站:" prop="relativeStationCode">
<el-select v-model="addModel.relativeStationCode" clearable filterable>
<el-option
v-for="item in stationList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'relativeStationCode' ? 'danger' : 'primary'"
@click="hover('relativeStationCode')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="相对运行方向:" prop="relativeLabelEnum">
<el-select v-model="addModel.relativeLabelEnum">
<el-option
v-for="item in directionLabelList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<div class="bigDraft">
<el-button-group class="bigDraftBtn">
<el-button v-if="isModify" type="warning" size="small" :loading="loading" @click="update ">更新</el-button>
<el-button v-else type="primary" size="small" :loading="loading" @click="save">保存</el-button>
</el-button-group>
</div>
</div>
</template>
<script>
import { setUID } from '@/jmapNew/utils/Uid';
import { deepAssign } from '@/utils/index';
import { saveAssist } from '@/api/assist';
import { mapGetters } from 'vuex';
import ConstConfig from '@/scripts/ConstConfig';
import { queryAssistListPaged } from '@/api/assist';
export default {
name:'BigRouteInfo',
props: {
selected: {
type: Object,
default() {
return null;
}
},
mapInfo: {
type: Object,
default() {
return null;
}
}
},
data() {
var checkSectionList = (rule, value, callback) => {
if (!value || value.length === 0){
callback(new Error('请选择关联区段!'));
} else {
callback();
}
};
return {
field: '',
loading: false,
isModify:false,
mainDeviceList: [],
directionLabelList: ConstConfig.ConstSelect.directionLabelList,
addModel:{
id: '',
name:'',
stationCode: '',
labelEnum:'',
sectionList: [],
signalCode: '',
runModel: '',
runStatus: '',
relativeStationCode: '',
relativeLabelEnum: ''
},
rules: {
'name':[
{ required: true, message: '请输入名称', trigger: 'blur' },
],
'stationCode':[
{ required: true, message: '请选择关联车站', trigger: 'blur' },
{ required: true, message: '请选择关联车站', trigger: 'change' },
],
'labelEnum': [
{ required: true, message: '请选择运行方向', trigger: 'change' }
],
'signalCode': [
{ required: true, message: '请选择关联信号机', trigger: 'change' }
],
'sectionList': [
{ validator: checkSectionList, trigger: 'change' },
{ required: true, message: '请选择关联区段', trigger: 'blur' }
],
'runModel': [
{ required: true, message: '请选择闭塞类型', trigger: 'change' }
],
'runStatus': [
{ required: true, message: '请选择默认状态', trigger: 'change' }
],
'relativeStationCode': [
{ required: true, message: '请选择相对运行车站', trigger: 'blur' },
{ required: true, message: '请选择相对运行车站', trigger: 'change' }
],
'relativeLabelEnum': [
{ required: true, message: '请选择相对运行方向', trigger: 'change' }
]
},
runModelList: [
{ label: '自动闭塞', value: 'A' },
{ label: '半自动闭塞', value: 'S' }
],
runStatusList: [
{ label: '接车口', value: 'R' },
{ label: '发车口', value: 'D' },
{ label: '无状态', value: 'NO' }
],
relativeList: []
};
},
computed: {
...mapGetters('map', [
'sectionList',
'stationList',
'signalButtonList',
'signalList'
])
},
mounted() {
this.initPage();
},
methods:{
initPage() {
if (this.mapInfo) {
queryAssistListPaged({pageNum: 1, pageSize: 999},this.mapInfo.id).then(resp => {
this.relativeList = resp.data.list;
});
}
},
hover(field) {
this.field = field === this.field ? '' : field;
},
changeRadio() {
this.$refs.form.clearValidate();
},
setSelected(selected) {
if (selected) {
if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'sectionList'.toUpperCase()) {
this.addModel.sectionList.push(selected.code);
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'stationCode'.toUpperCase()) {
this.addModel.stationCode = selected.code;
this.field = '';
} else if (selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'signalCode'.toUpperCase()){
this.addModel.signalCode = selected.code;
this.field = '';
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'relativeStationCode'.toUpperCase()) {
this.addModel.relativeStationCode = selected.code;
this.field = '';
}
}
},
save() {
const that = this;
that.$refs.form.validate((valid) => {
if (valid) {
const newModel = deepAssign({}, that.addModel);
// newModel.code = setUID('Route');
that.loading = true;
saveAssist(newModel, that.mapInfo.id).then(res=>{
that.$message.success(that.$t('tip.creatingSuccessful'));
that.loading = false;
this.initPage();
that.clear();
}).catch(() => {
that.$messageBox(that.$t('tip.operationAbnormal'));
that.loading = false;
});
}
});
},
clear() {
if (this.$refs && this.$refs.form && this.mapInfo) {
this.$refs.form.resetFields();
this.addModel = {
id: '',
name:'',
stationCode: '',
labelEnum:'',
sectionList: [],
signalCode: '',
runModel: '',
runStatus: '',
relativeCode: ''
};
}
}
}
};
// import { setUID } from '@/jmapNew/utils/Uid';
import { deepAssign } from '@/utils/index';
import { saveAssist } from '@/api/assist';
import { mapGetters } from 'vuex';
import ConstConfig from '@/scripts/ConstConfig';
import { queryAssistListPaged } from '@/api/assist';
export default {
name:'BigRouteInfo',
props: {
selected: {
type: Object,
default() {
return null;
}
},
mapInfo: {
type: Object,
default() {
return null;
}
}
},
data() {
var checkSectionList = (rule, value, callback) => {
if (!value || value.length === 0) {
callback(new Error('请选择关联区段!'));
} else {
callback();
}
};
return {
field: '',
loading: false,
isModify:false,
mainDeviceList: [],
directionLabelList: ConstConfig.ConstSelect.directionLabelList,
addModel:{
id: '',
name:'',
stationCode: '',
labelEnum:'',
sectionList: [],
signalCode: '',
runModel: '',
runStatus: '',
relativeStationCode: '',
relativeLabelEnum: ''
},
rules: {
'name':[
{ required: true, message: '请输入名称', trigger: 'blur' }
],
'stationCode':[
{ required: true, message: '请选择关联车站', trigger: 'blur' },
{ required: true, message: '请选择关联车站', trigger: 'change' }
],
'labelEnum': [
{ required: true, message: '请选择运行方向', trigger: 'change' }
],
'signalCode': [
{ required: true, message: '请选择关联信号机', trigger: 'change' }
],
'sectionList': [
{ validator: checkSectionList, trigger: 'change' },
{ required: true, message: '请选择关联区段', trigger: 'blur' }
],
'runModel': [
{ required: true, message: '请选择闭塞类型', trigger: 'change' }
],
'runStatus': [
{ required: true, message: '请选择默认状态', trigger: 'change' }
]
},
runModelList: [
{ label: '自动闭塞', value: 'A' },
{ label: '半自动闭塞', value: 'S' }
],
runStatusList: [
{ label: '接车口', value: 'R' },
{ label: '发车口', value: 'D' },
{ label: '无状态', value: 'NO' }
],
relativeList: []
};
},
computed: {
...mapGetters('map', [
'sectionList',
'stationList',
'signalButtonList',
'signalList'
])
},
mounted() {
this.initPage();
},
methods:{
initPage() {
if (this.mapInfo) {
queryAssistListPaged({pageNum: 1, pageSize: 999}, this.mapInfo.id).then(resp => {
this.relativeList = resp.data.list;
});
}
},
hover(field) {
this.field = field === this.field ? '' : field;
},
changeRadio() {
this.$refs.form.clearValidate();
},
setSelected(selected) {
if (selected) {
if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'sectionList'.toUpperCase()) {
this.addModel.sectionList.push(selected.code);
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'stationCode'.toUpperCase()) {
this.addModel.stationCode = selected.code;
this.field = '';
} else if (selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'signalCode'.toUpperCase()) {
this.addModel.signalCode = selected.code;
this.field = '';
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'relativeStationCode'.toUpperCase()) {
this.addModel.relativeStationCode = selected.code;
this.field = '';
}
}
},
save() {
const that = this;
that.$refs.form.validate((valid) => {
if (valid) {
const newModel = deepAssign({}, that.addModel);
// newModel.code = setUID('Route');
that.loading = true;
saveAssist(newModel, that.mapInfo.id).then(res=>{
that.$message.success(that.$t('tip.creatingSuccessful'));
that.loading = false;
this.initPage();
that.clear();
}).catch(() => {
that.$messageBox(that.$t('tip.operationAbnormal'));
that.loading = false;
});
}
});
},
clear() {
if (this.$refs && this.$refs.form && this.mapInfo) {
this.$refs.form.resetFields();
this.addModel = {
id: '',
name:'',
stationCode: '',
labelEnum:'',
sectionList: [],
signalCode: '',
runModel: '',
runStatus: '',
relativeCode: ''
};
}
}
}
};
</script>
<style lang="scss" scoped>
.BigRouteInfo{

View File

@ -149,7 +149,8 @@ export default {
'textList',
'totalGuideLockButtonVOList',
'seclectDeviceList',
'trainWindowList'
'trainWindowList',
'signalButtonList'
])
},
watch: {
@ -283,7 +284,7 @@ export default {
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.indicatorLightList, ...this.lineList, ...this.outerFrameList,
...this.responderList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList].forEach(item => {
...this.responderList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList, ...this.signalButtonList].forEach(item => {
if (!stationCodes.includes(item.stationCode)) {
this.addModel.elementList.push(item.code);
}

View File

@ -223,7 +223,8 @@ export default {
'textList',
'totalGuideLockButtonVOList',
'seclectDeviceList',
'trainWindowList'
'trainWindowList',
'signalButtonList'
]),
cardTitle() {
if (this.cardMode === 'generate') {
@ -407,7 +408,7 @@ export default {
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.indicatorLightList, ...this.lineList, ...this.outerFrameList,
...this.responderList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList].forEach(item => {
...this.responderList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList, ...this.signalButtonList].forEach(item => {
const target = this.tableData.find(elem => elem.stationCodeList.includes(item.stationCode));
target && target.elementList.push(item.code);
});

View File

@ -204,7 +204,8 @@ export default {
'textList',
'totalGuideLockButtonVOList',
'seclectDeviceList',
'trainWindowList'
'trainWindowList',
'signalButtonList'
]),
cardTitle() {
if (this.cardMode === 'generate') {
@ -390,7 +391,7 @@ export default {
});
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.indicatorLightList, ...this.lineList, ...this.outerFrameList,
...this.responderList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList].forEach(item => {
...this.responderList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList, ...this.signalButtonList].forEach(item => {
if (!stationCodeList.includes(item.stationCode)) {
tempData.elementList.push(item.code);
}
@ -446,7 +447,7 @@ export default {
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.indicatorLightList, ...this.lineList, ...this.outerFrameList,
...this.responderList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList].forEach(item => {
...this.responderList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList, ...this.signalButtonList].forEach(item => {
const target = this.tableData.find(elem => elem.stationCodeList.includes(item.stationCode));
target && target.elementList.push(item.code);
});