Merge remote-tracking branch 'origin/test'
# Conflicts: # src/jmapNew/config/skinCode/datie_02.js
This commit is contained in:
commit
44363cc3e8
@ -521,3 +521,11 @@ export function getRunplanInRailway(group) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 大铁 获取 ctc 车站 运行日志
|
||||||
|
export function getRunplanInStation(group) {
|
||||||
|
return request({
|
||||||
|
url: `/api/simulation/${group}/ctc/station/runPlan/list`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -8,4 +8,10 @@ export function uploadAudioFiles(file) {
|
|||||||
data: file
|
data: file
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 获取百度语音合成token */
|
||||||
|
export function getBaiduToken() {
|
||||||
|
return request({
|
||||||
|
url: `/api/voice/token/baidu`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -165,10 +165,11 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
|||||||
|
|
||||||
function trainRunNew(data){
|
function trainRunNew(data){
|
||||||
let code = data.code;
|
let code = data.code;
|
||||||
|
// console.log(rails.sectionrail[data.section],data.section,code,'--------')
|
||||||
if(rails.sectionrail[data.section]){
|
if(rails.sectionrail[data.section]){
|
||||||
if(trainlisttest.list[code].right != data.right){
|
if(trainlisttest.list[code].right != data.right){
|
||||||
if(data.right == "0"){
|
if(data.right == "0"){
|
||||||
|
console.log('right==0')
|
||||||
trainlisttest.list[code].right = "0";
|
trainlisttest.list[code].right = "0";
|
||||||
trainlisttest.list[code].rotation.y = Math.PI;
|
trainlisttest.list[code].rotation.y = Math.PI;
|
||||||
let point = rails.sectionrail[data.section].lineleft.getPointAt(data.offset);
|
let point = rails.sectionrail[data.section].lineleft.getPointAt(data.offset);
|
||||||
@ -210,6 +211,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
if(data.right == "1"){
|
if(data.right == "1"){
|
||||||
|
console.log('right==1')
|
||||||
trainlisttest.list[code].right = "1";
|
trainlisttest.list[code].right = "1";
|
||||||
trainlisttest.list[code].rotation.y = 0;
|
trainlisttest.list[code].rotation.y = 0;
|
||||||
let point = rails.sectionrail[data.section].lineleft.getPointAt(data.offset);
|
let point = rails.sectionrail[data.section].lineleft.getPointAt(data.offset);
|
||||||
@ -250,8 +252,9 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
|
console.log(trainlisttest.list[code].dispose,'88888888');
|
||||||
if(trainlisttest.list[code].dispose == "0"){
|
if(trainlisttest.list[code].dispose == "0") {
|
||||||
|
console.log(trainlisttest.list[code].dispose,'-----------');
|
||||||
if (data.right == '1') { // 向右
|
if (data.right == '1') { // 向右
|
||||||
trainlisttest.list[code].right = '1';
|
trainlisttest.list[code].right = '1';
|
||||||
trainlisttest.list[code].progress = data.offset;
|
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{
|
}else{
|
||||||
|
// console.log(code,'trainlisttest.list[code].position.x = -1000000')
|
||||||
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].position.y = 0;
|
||||||
// trainlisttest.list[code].progress = 0;
|
// trainlisttest.list[code].progress = 0;
|
||||||
trainlisttest.list[code].dispose = "0";
|
trainlisttest.list[code].dispose = "0";
|
||||||
|
debugger
|
||||||
trainlisttest.list[code].nowcode = data.body.deviceList[i].section;
|
trainlisttest.list[code].nowcode = data.body.deviceList[i].section;
|
||||||
trainlisttest.list[code].nextcode = null;
|
trainlisttest.list[code].nextcode = null;
|
||||||
trainlisttest.list[code].curve = null;
|
trainlisttest.list[code].curve = null;
|
||||||
|
@ -395,8 +395,8 @@ class SkinCode extends defaultStyle {
|
|||||||
redColor: '#FF0000', // 控制模式红色
|
redColor: '#FF0000', // 控制模式红色
|
||||||
yellowColor: '#FFFF00', // 控制模式黄色
|
yellowColor: '#FFFF00', // 控制模式黄色
|
||||||
purpleColor:'#840084', // 控制模式紫色
|
purpleColor:'#840084', // 控制模式紫色
|
||||||
strokeColor: '#fff',
|
strokeColor: '#fff',
|
||||||
lineWidth: 1
|
lineWidth: 1
|
||||||
},
|
},
|
||||||
emergencyControl: { // 紧急站控
|
emergencyControl: { // 紧急站控
|
||||||
show: false,
|
show: false,
|
||||||
@ -427,79 +427,81 @@ class SkinCode extends defaultStyle {
|
|||||||
arrowShow: false,
|
arrowShow: false,
|
||||||
grayColor: '#7F7F7F'
|
grayColor: '#7F7F7F'
|
||||||
},
|
},
|
||||||
veryControl: {
|
veryControl: {
|
||||||
show: true,
|
show: true,
|
||||||
offset: { x: 0, y: 0 },
|
offset: { x: 0, y: 0 },
|
||||||
lightColor: '#f00',
|
lightColor: '#f00',
|
||||||
defaultColor: '#7F7F7F',
|
defaultColor: '#7F7F7F',
|
||||||
text: '非常站控'
|
text: '非常站控'
|
||||||
},
|
},
|
||||||
selfDiscipline: {
|
selfDiscipline: {
|
||||||
show: true,
|
show: true,
|
||||||
offset: { x: 0, y: 0 },
|
offset: { x: 0, y: 0 },
|
||||||
text: '允许自律'
|
text: '允许自律',
|
||||||
},
|
defaultColor: '#7F7F7F',
|
||||||
selfDisciplineControl: {
|
lightColor: '#ff0'
|
||||||
show: true,
|
},
|
||||||
offset: { x: 0, y: 0 },
|
selfDisciplineControl: {
|
||||||
lightColor: '#0f0',
|
show: true,
|
||||||
defaultColor: '#7F7F7F',
|
offset: { x: 0, y: 0 },
|
||||||
text: '自律控制'
|
lightColor: '#0f0',
|
||||||
},
|
defaultColor: '#7F7F7F',
|
||||||
veryControlButton: {
|
text: '自律控制'
|
||||||
offset: { x: 0, y: 0 },
|
},
|
||||||
text: '非常站控',
|
veryControlButton: {
|
||||||
lightColor: '#ff0',
|
offset: { x: 0, y: 0 },
|
||||||
defaultColor: '#ccc',
|
text: '非常站控',
|
||||||
},
|
lightColor: '#ff0',
|
||||||
selfDisciplineThree: {
|
defaultColor: '#ccc'
|
||||||
offset: { x: 0, y: 0 },
|
},
|
||||||
text: '分散自律',
|
selfDisciplineThree: {
|
||||||
lightColor: '#0f0',
|
offset: { x: 0, y: 0 },
|
||||||
defaultColor: '#ccc'
|
text: '分散自律',
|
||||||
},
|
lightColor: '#0f0',
|
||||||
graphRoad: {
|
defaultColor: '#ccc'
|
||||||
show: true,
|
},
|
||||||
offset: { x: 0, y: 0 },
|
graphRoad: {
|
||||||
text: '按图排路',
|
show: true,
|
||||||
lightColor: '#0f0',
|
offset: { x: 0, y: 0 },
|
||||||
defaultColor: '#ccc'
|
text: '按图排路',
|
||||||
},
|
lightColor: '#0f0',
|
||||||
planControl: {
|
defaultColor: '#ccc'
|
||||||
show: true,
|
},
|
||||||
offset: { x: 0, y: 0 },
|
planControl: {
|
||||||
text: '计划控制',
|
show: true,
|
||||||
lightColor: '#0f0',
|
offset: { x: 0, y: 0 },
|
||||||
defaultColor: '#ccc'
|
text: '计划控制',
|
||||||
},
|
lightColor: '#0f0',
|
||||||
centerCommunication: {
|
defaultColor: '#ccc'
|
||||||
show: true,
|
},
|
||||||
offset: { x: 0, y: 30 },
|
centerCommunication: {
|
||||||
text: '中心通信',
|
show: true,
|
||||||
lightColor: '#0f0',
|
offset: { x: 0, y: 30 },
|
||||||
defaultColor: '#ccc'
|
text: '中心通信',
|
||||||
},
|
lightColor: '#0f0',
|
||||||
selfDisciplineCommunication: {
|
defaultColor: '#ccc'
|
||||||
show: true,
|
},
|
||||||
offset: { x: 0, y: 30 },
|
selfDisciplineCommunication: {
|
||||||
text: '自律机通信',
|
show: true,
|
||||||
lightColor: '#0f0',
|
offset: { x: 0, y: 30 },
|
||||||
defaultColor: '#ccc'
|
text: '自律机通信',
|
||||||
},
|
lightColor: '#0f0',
|
||||||
allowedTurnBack: {
|
defaultColor: '#ccc'
|
||||||
show: true,
|
},
|
||||||
offset: { x: 0, y: 30 },
|
allowedTurnBack: {
|
||||||
text: '允许转回',
|
show: true,
|
||||||
lightColor: '#0f0',
|
offset: { x: 0, y: 30 },
|
||||||
defaultColor: '#ccc'
|
text: '允许转回',
|
||||||
},
|
lightColor: '#0f0',
|
||||||
trainControl: {
|
defaultColor: '#ccc'
|
||||||
show: true,
|
},
|
||||||
offset: { x: 0, y: 30 },
|
trainControl: {
|
||||||
text: '列控',
|
show: true,
|
||||||
lightColor: '#0f0',
|
offset: { x: 0, y: 30 },
|
||||||
defaultColor: '#ccc'
|
text: '列控',
|
||||||
}
|
lightColor: '#0f0',
|
||||||
|
defaultColor: '#ccc'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -849,9 +851,10 @@ class SkinCode extends defaultStyle {
|
|||||||
lrPadding: 4, // 两边间隔
|
lrPadding: 4, // 两边间隔
|
||||||
upPadding: 4, // 上边距离
|
upPadding: 4, // 上边距离
|
||||||
trainBodyFillColor: '#88DF8E', // 列车车身填充颜色
|
trainBodyFillColor: '#88DF8E', // 列车车身填充颜色
|
||||||
trainSidelineColor: '#F00',
|
trainSidelineColor: '#F00',
|
||||||
trainSidelineStopColor: '#000',
|
trainSidelineStopColor: '#000',
|
||||||
trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
|
// trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
|
||||||
|
trainNameFormat:'tripNumber'
|
||||||
},
|
},
|
||||||
directionArrow: {
|
directionArrow: {
|
||||||
},
|
},
|
||||||
@ -874,20 +877,21 @@ class SkinCode extends defaultStyle {
|
|||||||
trainNumber: {
|
trainNumber: {
|
||||||
targetCodePrefix: '000', // 目的地码前缀
|
targetCodePrefix: '000', // 目的地码前缀
|
||||||
defaultTargetCode: 'DDD', // 默认目的地码
|
defaultTargetCode: 'DDD', // 默认目的地码
|
||||||
fontColor: '#F00',
|
fontColor: '#F00',
|
||||||
trainTargetTextAlign: 'left', // 目的地码文字显示位置
|
trainTargetTextAlign: 'left', // 目的地码文字显示位置
|
||||||
trainNumberOffset: { x: 24, y: 4}// 目的地码偏移量
|
trainNumberOffset: { x: 24, y: 4}// 目的地码偏移量
|
||||||
},
|
},
|
||||||
trainServer: {
|
trainServer: {
|
||||||
serviceNumberPrefix: '000', // 服务号(表号)前缀
|
serviceNumberPrefix: '000', // 服务号(表号)前缀
|
||||||
defaultServiceNumber: 'TTT', // 默认服务号(表号)
|
defaultServiceNumber: 'TTT', // 默认服务号(表号)
|
||||||
defaultServerNoColor: '#F00', // 默认服务号状态显示颜色
|
defaultServerNoColor: '#F00', // 默认服务号状态显示颜色
|
||||||
fontColor: '#F00',
|
fontColor: '#F00',
|
||||||
trainServerOffset: { x: 4, y: 4} // 列车服务号偏移
|
trainServerOffset: { x: 4, y: 4} // 列车服务号偏移
|
||||||
},
|
},
|
||||||
trainTarget: {
|
trainTarget: {
|
||||||
tripNumberPrefix: '000', // 车次号前缀
|
tripNumberPrefix: '', // 车次号前缀
|
||||||
defaultTripNumber: 'DDD', // 默认车次号2
|
// defaultTripNumber: 'DDD', // 默认车次号2
|
||||||
|
defaultTripNumber: ' ', // 默认车次号
|
||||||
trainTargetOffset: { x: 36, y: 4}, // 列车车次号偏移
|
trainTargetOffset: { x: 36, y: 4}, // 列车车次号偏移
|
||||||
trainTargetTextAlign: 'right' // 车次号文字显示位置
|
trainTargetTextAlign: 'right' // 车次号文字显示位置
|
||||||
},
|
},
|
||||||
@ -899,13 +903,13 @@ class SkinCode extends defaultStyle {
|
|||||||
trainHead: {
|
trainHead: {
|
||||||
trainConntWidth: 10, // 列车竖杠的宽度
|
trainConntWidth: 10, // 列车竖杠的宽度
|
||||||
trainHeadFillColor: '#189B4D', // 列车车头矩形填充颜色
|
trainHeadFillColor: '#189B4D', // 列车车头矩形填充颜色
|
||||||
trainHeadRectNoChange: true, // 列车车头矩形填充颜色不变
|
trainHeadRectNoChange: true, // 列车车头矩形填充颜色不变
|
||||||
trainHeadRectHeight: 20, // 列车车头矩形高度
|
trainHeadRectHeight: 20, // 列车车头矩形高度
|
||||||
directionStopType:'specialAll', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
directionStopType:'specialAll', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||||
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
|
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
|
||||||
trainHeadArrowWidth: 15, // 列车车头三角宽度
|
trainHeadArrowWidth: 15, // 列车车头三角宽度
|
||||||
trainHeadArrowOffsetX: 0, // 列车车头三角偏移
|
trainHeadArrowOffsetX: 0, // 列车车头三角偏移
|
||||||
trainHeadRectOffsetX: 10
|
trainHeadRectOffsetX: 10
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
trainHeight: 20, // 列车高度
|
trainHeight: 20, // 列车高度
|
||||||
@ -955,16 +959,16 @@ class SkinCode extends defaultStyle {
|
|||||||
{
|
{
|
||||||
type: 1,
|
type: 1,
|
||||||
lineLShow: true,
|
lineLShow: true,
|
||||||
arrowLShow: false,
|
arrowLShow: false,
|
||||||
lineRShow: false,
|
lineRShow: false,
|
||||||
arrowRShow: true
|
arrowRShow: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 0,
|
type: 0,
|
||||||
lineLShow: false,
|
lineLShow: false,
|
||||||
arrowLShow: true,
|
arrowLShow: true,
|
||||||
lineRShow: true,
|
lineRShow: true,
|
||||||
arrowRShow: false
|
arrowRShow: false
|
||||||
}
|
}
|
||||||
], // 列车停止方向类型对应车头显示状态 1从左往右 0从右往左
|
], // 列车停止方向类型对应车头显示状态 1从左往右 0从右往左
|
||||||
driveModeStatus: [
|
driveModeStatus: [
|
||||||
@ -1012,125 +1016,125 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
this[deviceType.DepartArrow] = {
|
this[deviceType.DepartArrow] = {
|
||||||
triangleLength: 15,
|
triangleLength: 15,
|
||||||
lineWidth: 8,
|
lineWidth: 8,
|
||||||
length: 35,
|
length: 35,
|
||||||
distance: 15,
|
distance: 15,
|
||||||
fill: '#000',
|
fill: '#000',
|
||||||
stroke: '#fff',
|
stroke: '#fff',
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
defaultText: '发车',
|
defaultText: '发车',
|
||||||
defaultColor: '#ccc',
|
defaultColor: '#ccc',
|
||||||
occupiedColor:'#f00',
|
occupiedColor:'#f00',
|
||||||
noOccupiedColor:'#00ff00',
|
noOccupiedColor:'#00ff00',
|
||||||
blockStatusColor:'#00ff00',
|
blockStatusColor:'#00ff00',
|
||||||
noBlockStatusColor:'#ffff00',
|
noBlockStatusColor:'#ffff00'
|
||||||
};
|
};
|
||||||
this[deviceType.PickArrow] = {
|
this[deviceType.PickArrow] = {
|
||||||
triangleLength: 15,
|
triangleLength: 15,
|
||||||
lineWidth: 8,
|
lineWidth: 8,
|
||||||
length: 35,
|
length: 35,
|
||||||
distance: 15,
|
distance: 15,
|
||||||
fill: '#000',
|
fill: '#000',
|
||||||
stroke: '#fff',
|
stroke: '#fff',
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
defaultText: '接车',
|
defaultText: '接车',
|
||||||
defaultColor: '#ccc',
|
defaultColor: '#ccc',
|
||||||
occupiedColor:'#f00',
|
occupiedColor:'#f00',
|
||||||
noOccupiedColor:'#ffff00',
|
noOccupiedColor:'#ffff00',
|
||||||
blockStatusColor:'#00ff00',
|
blockStatusColor:'#00ff00',
|
||||||
noBlockStatusColor:'#ffff00',
|
noBlockStatusColor:'#ffff00'
|
||||||
};
|
};
|
||||||
this[deviceType.Occlusion] = {
|
this[deviceType.Occlusion] = {
|
||||||
text: {
|
text: {
|
||||||
fontSize: 11, // 字体大小
|
fontSize: 11, // 字体大小
|
||||||
fontWeight: 'normal', // 字体粗细
|
fontWeight: 'normal', // 字体粗细
|
||||||
distance: 5 // 灯跟文字距离
|
distance: 5 // 灯跟文字距离
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
radiusR: 6, // 控制灯大小
|
radiusR: 6, // 控制灯大小
|
||||||
controlColor: '#ccc' // 控制灯颜色
|
controlColor: '#ccc' // 控制灯颜色
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this[deviceType.Accident] = {
|
this[deviceType.Accident] = {
|
||||||
text: {
|
text: {
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: 'normal',
|
fontWeight: 'normal',
|
||||||
distance: 5
|
distance: 5
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
radiusR: 6,
|
radiusR: 6,
|
||||||
controlColor: '#ccc'
|
controlColor: '#ccc'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this[deviceType.Recovery] = {
|
this[deviceType.Recovery] = {
|
||||||
text: {
|
text: {
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: 'normal',
|
fontWeight: 'normal',
|
||||||
distance: 5
|
distance: 5
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
radiusR: 6,
|
radiusR: 6,
|
||||||
controlColor: '#ccc'
|
controlColor: '#ccc'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this[deviceType.PickAssist] = {
|
this[deviceType.PickAssist] = {
|
||||||
text: {
|
text: {
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: 'normal',
|
fontWeight: 'normal',
|
||||||
distance: 5
|
distance: 5
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
radiusR: 6,
|
radiusR: 6,
|
||||||
controlColor: '#ccc'
|
controlColor: '#ccc'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this[deviceType.DepartAssist] = {
|
this[deviceType.DepartAssist] = {
|
||||||
text: {
|
text: {
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: 'normal',
|
fontWeight: 'normal',
|
||||||
distance: 5
|
distance: 5
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
radiusR: 6,
|
radiusR: 6,
|
||||||
controlColor: '#ccc'
|
controlColor: '#ccc'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this[deviceType.TotalAssist] = {
|
this[deviceType.TotalAssist] = {
|
||||||
text: {
|
text: {
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: 'normal',
|
fontWeight: 'normal',
|
||||||
distance: 5
|
distance: 5
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
radiusR: 6,
|
radiusR: 6,
|
||||||
controlColor: '#ccc'
|
controlColor: '#ccc'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this[deviceType.AssistStatus] = {
|
this[deviceType.AssistStatus] = {
|
||||||
text: {
|
text: {
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: 'normal',
|
fontWeight: 'normal',
|
||||||
distance: 5
|
distance: 5
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
radiusR: 6,
|
radiusR: 6,
|
||||||
controlColor: '#ccc',
|
controlColor: '#ccc',
|
||||||
occupiedColor:'#ffffff',
|
occupiedColor:'#ffffff'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this[deviceType.SectionOccupied] = {
|
this[deviceType.SectionOccupied] = {
|
||||||
text: {
|
text: {
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: 'normal',
|
fontWeight: 'normal',
|
||||||
distance: 5
|
distance: 5
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
radiusR: 6,
|
radiusR: 6,
|
||||||
controlColor: '#ccc',
|
controlColor: '#ccc',
|
||||||
occupiedColor:'#ff0000',
|
occupiedColor:'#ff0000'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,8 @@ class SkinCode extends defaultStyle {
|
|||||||
super();
|
super();
|
||||||
this.fontFamily = '宋体';
|
this.fontFamily = '宋体';
|
||||||
this[deviceType.Section] = {
|
this[deviceType.Section] = {
|
||||||
elemnetType:['name', 'line', 'separator', 'badShunt', 'derailer'],
|
elemnetType:['name', 'line', 'separator', 'derailer'],
|
||||||
|
// 'badShunt'
|
||||||
name: {
|
name: {
|
||||||
z: 10,
|
z: 10,
|
||||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||||
@ -33,6 +34,7 @@ class SkinCode extends defaultStyle {
|
|||||||
z: 0,
|
z: 0,
|
||||||
width: 3, // 区段宽度
|
width: 3, // 区段宽度
|
||||||
beyondWidth: 0, // 区段宽超出宽度
|
beyondWidth: 0, // 区段宽超出宽度
|
||||||
|
badShuntDashLine:true, // 区段分路不良标记
|
||||||
invadeColor: '#FF0000', // 区段侵入颜色 (红色)
|
invadeColor: '#FF0000', // 区段侵入颜色 (红色)
|
||||||
spareColor: '#808080', // 区段空闲颜色 (灰色) ok
|
spareColor: '#808080', // 区段空闲颜色 (灰色) ok
|
||||||
|
|
||||||
@ -53,11 +55,99 @@ class SkinCode extends defaultStyle {
|
|||||||
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
||||||
logicalTextColor: '#C0C0C0', // 逻辑区段名称颜色 (未用)
|
logicalTextColor: '#C0C0C0', // 逻辑区段名称颜色 (未用)
|
||||||
invalidColor: '#B18E38' // 区段ARB故障颜色
|
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] = {
|
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:'', // 字体边框颜色
|
borderColor:'', // 字体边框颜色
|
||||||
textBorderWidth:0 // 字体边框宽度
|
textBorderWidth:0 // 字体边框宽度
|
||||||
},
|
},
|
||||||
|
|
||||||
text: {
|
text: {
|
||||||
fontSize: 11, // 字体大小
|
fontSize: 11, // 字体大小
|
||||||
fontWeight: 'normal', // 字体粗细
|
fontWeight: 'normal', // 字体粗细
|
||||||
distance: 5 // 灯跟文字距离
|
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 对称
|
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||||
offset: {x: 5, y: -10}, // 道岔名称与区段距离
|
offset: {x: 5, y: -10}, // 道岔名称与区段距离
|
||||||
fontSize: 11, // 字体大小
|
fontSize: 11, // 字体大小
|
||||||
fontColor: '#fff', // 道岔名称颜色
|
fontColor: '#FFFF00', // 道岔名称颜色
|
||||||
fontWeight: 'normal', // 字体粗细
|
fontWeight: 'normal', // 字体粗细
|
||||||
borderColor: '#FE0000', // 道岔边框颜色
|
borderColor: '#FE0000', // 道岔边框颜色
|
||||||
lossColor: '#C00808', // 道岔失去颜色
|
lossColor: '#FFFF00', // 道岔失去颜色
|
||||||
|
blockText:'#fff', // 道岔封锁文字颜色
|
||||||
|
blockTextBack:'#f00', // 道岔封锁文字背景颜色
|
||||||
|
lockTextBack:'#fff', // 道岔单锁文字背景颜色
|
||||||
|
fpLockColor:'#f00', // 道岔侧防文字背景颜色
|
||||||
|
guideMasterLockColor:'#f00', // 道岔引导总锁文字背景颜色
|
||||||
|
|
||||||
locateColor: '#00FF00', // 道岔定位颜色 ok
|
// #808080
|
||||||
inversionColor: '#FFFF00', // 道岔反位颜色 ok
|
locateColor: 'rgb(192,192,192)', // 道岔定位颜色 ok
|
||||||
|
inversionColor: 'rgb(192,192,192)', // 道岔反位颜色 ok
|
||||||
|
|
||||||
monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
monolockLocationColor: '#f00', // 道岔单锁'定位'颜色 (绿色)
|
||||||
monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
|
monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
|
||||||
faultFlashing: false // 故障闪烁
|
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] = {
|
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 // 车次窗是否显示
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -84,8 +84,16 @@ class Jlmap {
|
|||||||
return selectLineCode(lineCode);
|
return selectLineCode(lineCode);
|
||||||
}
|
}
|
||||||
reloadStyle(lineCode) {
|
reloadStyle(lineCode) {
|
||||||
|
if (this.lineCode !== lineCode) {
|
||||||
|
this.handleModelData(this.lineCode, lineCode);
|
||||||
|
}
|
||||||
|
this.lineCode = lineCode;
|
||||||
this.style = selectLineCode(lineCode);
|
this.style = selectLineCode(lineCode);
|
||||||
this.$zr.dom.style.backgroundColor = this.style.backgroundColor || '#000';
|
this.$zr.dom.style.backgroundColor = this.style.backgroundColor || '#000';
|
||||||
|
}
|
||||||
|
// 处理私有属性
|
||||||
|
handleModelData(oldLineCode, lineCode) {
|
||||||
|
|
||||||
}
|
}
|
||||||
loadDefaultState() { // 加载默认状态
|
loadDefaultState() { // 加载默认状态
|
||||||
const defaultStateDict = {};
|
const defaultStateDict = {};
|
||||||
|
@ -306,7 +306,7 @@ class MouseController extends Eventful {
|
|||||||
if (this.whetherInclude(boundingRect, deviceBoundingRect )) {
|
if (this.whetherInclude(boundingRect, deviceBoundingRect )) {
|
||||||
includeDeviceList.push(item);
|
includeDeviceList.push(item);
|
||||||
} // item.instance._type !== deviceType.TrainWindow &&
|
} // 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 rect = item.instance.getBoundingRect();
|
||||||
const deviceBoundingRect = {
|
const deviceBoundingRect = {
|
||||||
x1: rect.x,
|
x1: rect.x,
|
||||||
|
@ -580,6 +580,10 @@ export default class ELines extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setDashed() {
|
||||||
|
this.section.setStyle('lineDash', [2, 2]);
|
||||||
|
}
|
||||||
|
|
||||||
addHover(style) {
|
addHover(style) {
|
||||||
this.__zr && this.__zr.addHover(this.section, style);
|
this.__zr && this.__zr.addHover(this.section, style);
|
||||||
}
|
}
|
||||||
@ -590,6 +594,9 @@ export default class ELines extends Group {
|
|||||||
|
|
||||||
recover() {
|
recover() {
|
||||||
this.section && this.section.show();
|
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.stopAnimation(true);
|
||||||
this.centerSquare && this.centerSquare.setStyle({fill: this.model.style.Section.cross.centerSquare.defaultColor});
|
this.centerSquare && this.centerSquare.setStyle({fill: this.model.style.Section.cross.centerSquare.defaultColor});
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,8 @@ export default class ESeparator extends Group {
|
|||||||
shape: {
|
shape: {
|
||||||
cx: modelData.point.x,
|
cx: modelData.point.x,
|
||||||
cy: modelData.point.y,
|
cy: modelData.point.y,
|
||||||
r: this.style.Section.line.width
|
r: this.style.Section.separator.halfHeight
|
||||||
|
// this.style.Section.line.width+
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
stroke: this.style.Section.line.invadeColor,
|
stroke: this.style.Section.line.invadeColor,
|
||||||
@ -123,6 +124,26 @@ export default class ESeparator extends Group {
|
|||||||
return partition;
|
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) {
|
createNormal(modelData) {
|
||||||
let partition;
|
let partition;
|
||||||
const style = this.model.style;
|
const style = this.model.style;
|
||||||
@ -218,7 +239,7 @@ export default class ESeparator extends Group {
|
|||||||
partition = [this.createModel(modelData, points, lineWidth, stroke)];
|
partition = [this.createModel(modelData, points, lineWidth, stroke)];
|
||||||
} else if (type === '04') { // 侵限分隔符
|
} else if (type === '04') { // 侵限分隔符
|
||||||
if (this.style.Section.separator.invadeSpecial) {
|
if (this.style.Section.separator.invadeSpecial) {
|
||||||
partition = [this.createNormal(modelData), this.createCircle(modelData)];
|
partition = [this.createVertical(modelData), this.createCircle(modelData)];
|
||||||
} else {
|
} else {
|
||||||
partition = [this.createCircle(modelData)];
|
partition = [this.createCircle(modelData)];
|
||||||
}
|
}
|
||||||
|
@ -549,7 +549,11 @@ export default class Section extends Group {
|
|||||||
|
|
||||||
// 分路不良
|
// 分路不良
|
||||||
badShuntStatus() {
|
badShuntStatus() {
|
||||||
this.badShunt && this.badShunt.show();
|
if (this.style.Section.line.badShuntDashLine) {
|
||||||
|
this.line.setDashed();
|
||||||
|
} else {
|
||||||
|
this.badShunt && this.badShunt.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 计算提示位置*/
|
/** 计算提示位置*/
|
||||||
|
@ -375,13 +375,23 @@ class Signal extends Group {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const timeNameY = computedPosition.y + model.positionPoint.y - posit * 15;
|
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({
|
this.remainTimeName = new ESigName({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
silent: false,
|
silent: false,
|
||||||
style: style,
|
style: style,
|
||||||
x: sigNameX,
|
x: remainX,
|
||||||
y: timeNameY,
|
// + offsetX,sigNameX
|
||||||
|
y: remainY,
|
||||||
|
// + offsetY,timeNameY
|
||||||
text: model.remainTime || 0,
|
text: model.remainTime || 0,
|
||||||
fontWeight: style.Signal.text.fontWeight,
|
fontWeight: style.Signal.text.fontWeight,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
@ -936,7 +946,9 @@ class Signal extends Group {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (this.model.type === 'SHUNTING') {
|
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() {
|
setAshShow() {
|
||||||
@ -1070,6 +1082,8 @@ class Signal extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// model.remainTime = 26;
|
||||||
|
// this.setDelayUnlock();
|
||||||
if (model.remainTime) {
|
if (model.remainTime) {
|
||||||
this.showRemainTime(model.remainTime);
|
this.showRemainTime(model.remainTime);
|
||||||
} else {
|
} else {
|
||||||
|
@ -30,90 +30,94 @@ export default class SignalButton extends Group {
|
|||||||
const model = this.model;
|
const model = this.model;
|
||||||
const computedPosition = this.computedPosition;
|
const computedPosition = this.computedPosition;
|
||||||
const fillColor = this.getTypeColor();
|
const fillColor = this.getTypeColor();
|
||||||
const queryList = window.location.search.substring(1).split('&');
|
// const queryList = window.location.search.substring(1).split('&');
|
||||||
const queryCtc = queryList.find(item => {
|
// const queryCtc = queryList.find(item => {
|
||||||
return item.includes('ctc');
|
// return item.includes('ctc');
|
||||||
});
|
// });
|
||||||
const ctcArcList = ['OCCLUSION', 'RECOVERY', 'CHANGE_DIRECTION', 'ACCIDENT', 'DEPART_ASSIST', 'PICK_ASSIST', 'ASSIST'];
|
// const ctcArcList = ['OCCLUSION', 'RECOVERY', 'CHANGE_DIRECTION', 'ACCIDENT', 'DEPART_ASSIST', 'PICK_ASSIST', 'ASSIST'];
|
||||||
const typeList = []
|
const typeList = [];
|
||||||
if (queryCtc && ctcArcList.includes(model.type)){
|
// debugger;
|
||||||
this.arcShape = new Arc({
|
// console.log(model.type);
|
||||||
zlevel: this.zlevel,
|
// if (queryCtc && ctcArcList.includes(model.type)) {
|
||||||
z: this.z,
|
// // debugger;
|
||||||
shape: {
|
// this.arcShape = new Arc({
|
||||||
cx: computedPosition.x + 7,
|
// zlevel: this.zlevel,
|
||||||
cy: computedPosition.y + 7,
|
// z: this.z,
|
||||||
r: 7
|
// shape: {
|
||||||
},
|
// cx: computedPosition.x + 7,
|
||||||
style: {
|
// cy: computedPosition.y + 7,
|
||||||
stroke: '#69666E',
|
// r: 7
|
||||||
lineWidth: 1,
|
// },
|
||||||
fill: fillColor
|
// style: {
|
||||||
}
|
// stroke: '#69666E',
|
||||||
});
|
// lineWidth: 1,
|
||||||
this.add(this.arcShape);
|
// fill: fillColor
|
||||||
} else if (this.style.SignalButton
|
// }
|
||||||
&& this.style.SignalButton.shape === 'roundWithDock'
|
// });
|
||||||
&& typeList.includes(model.type)) {
|
// this.add(this.arcShape);
|
||||||
|
// } else
|
||||||
|
if (this.style.SignalButton &&
|
||||||
|
this.style.SignalButton.shape === 'roundWithDock' &&
|
||||||
|
typeList.includes(model.type)) {
|
||||||
const circle1 = new Circle({
|
const circle1 = new Circle({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z + 2,
|
z: this.z + 2,
|
||||||
shape: {
|
shape: {
|
||||||
cx: computedPosition.x + 7,
|
cx: computedPosition.x + 7,
|
||||||
cy: computedPosition.y + 7,
|
cy: computedPosition.y + 7,
|
||||||
r: 7
|
r: 7
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
stroke: '#69666E',
|
stroke: '#69666E',
|
||||||
lineWidth: 1,
|
lineWidth: 1,
|
||||||
fill: fillColor
|
fill: fillColor
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
const circle2 = new Circle({
|
const circle2 = new Circle({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z + 1,
|
z: this.z + 1,
|
||||||
shape: {
|
shape: {
|
||||||
cx: computedPosition.x + 7,
|
cx: computedPosition.x + 7,
|
||||||
cy: computedPosition.y + 9,
|
cy: computedPosition.y + 9,
|
||||||
r: 8
|
r: 8
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
fill: '#000'
|
fill: '#000'
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
const circle3 = new Circle({
|
const circle3 = new Circle({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
shape: {
|
shape: {
|
||||||
cx: computedPosition.x + 7,
|
cx: computedPosition.x + 7,
|
||||||
cy: computedPosition.y + 9,
|
cy: computedPosition.y + 9,
|
||||||
r: 9
|
r: 9
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
fill: '#eee'
|
fill: '#eee'
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.arcShape = circle1
|
this.arcShape = circle1;
|
||||||
this.add(circle1).add(circle2).add(circle3)
|
this.add(circle1).add(circle2).add(circle3);
|
||||||
} else {
|
} else {
|
||||||
this.rectButton = new Rect({
|
this.rectButton = new Rect({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
shape: {
|
shape: {
|
||||||
x: model.position.x,
|
x: computedPosition.x,
|
||||||
y: model.position.y,
|
y: computedPosition.y,
|
||||||
width: 14,
|
width: 14,
|
||||||
height: 14
|
height: 14
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
lineDash: null,
|
lineDash: null,
|
||||||
stroke: '#69666E',
|
stroke: '#69666E',
|
||||||
lineWidth:1,
|
lineWidth:1,
|
||||||
fill: fillColor
|
fill: fillColor
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.add(this.rectButton);
|
this.add(this.rectButton);
|
||||||
}
|
}
|
||||||
this.leftLine = new Line({
|
this.leftLine = new Line({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z + 1,
|
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)) {
|
if (!store.getters['map/checkDeviceShow'](this._code)) {
|
||||||
this.buttonText && this.buttonText.hide();
|
this.buttonText && this.buttonText.hide();
|
||||||
this.rectButton && this.rectButton.hide();
|
this.rectButton && this.rectButton.hide();
|
||||||
|
@ -103,10 +103,10 @@ export default class EThreeLamp extends Group {
|
|||||||
this.add(this.text);
|
this.add(this.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
setColor(color) {
|
setColor(color, index) {
|
||||||
// if (color) {
|
if (color && this['control' + index]) {
|
||||||
// this.control.setStyle('fill', color);
|
this['control' + index].setStyle('fill', color);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setTextColor(color) {
|
setTextColor(color) {
|
||||||
|
@ -753,6 +753,7 @@ export default class Station extends Group {
|
|||||||
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
|
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.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.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) {
|
// if (this.style.Station.StationControl.disPlayNone) {
|
||||||
// this.stationText && this.stationText.setStyle('textFill', '#fff');
|
// this.stationText && this.stationText.setStyle('textFill', '#fff');
|
||||||
// if (this.model.subheadDisplay) { // 副标题
|
// 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.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.defaultColor);
|
||||||
this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.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.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) {
|
if (this.style.Station.stationText.isSpecialType) {
|
||||||
this.stationText.setColor(this.style.Station.stationText.noneModeColor);
|
this.stationText.setColor(this.style.Station.stationText.noneModeColor);
|
||||||
this.stationText.setBackground(this.style.Station.stationText.defaultBackColor);
|
this.stationText.setBackground(this.style.Station.stationText.defaultBackColor);
|
||||||
|
49
src/jmapNew/shape/graph/Switch/ESpecialCircle.js
Normal file
49
src/jmapNew/shape/graph/Switch/ESpecialCircle.js
Normal 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;
|
@ -16,7 +16,7 @@ class ESwName extends Group {
|
|||||||
|
|
||||||
this.nameText = new Text({
|
this.nameText = new Text({
|
||||||
zlevel: model.zlevel,
|
zlevel: model.zlevel,
|
||||||
z: model.z + 6,
|
z: model.z + 11,
|
||||||
style: {
|
style: {
|
||||||
x: model.nameTextX,
|
x: model.nameTextX,
|
||||||
y: model.nameTextY,
|
y: model.nameTextY,
|
||||||
@ -92,6 +92,10 @@ class ESwName extends Group {
|
|||||||
getTextRect() {
|
getTextRect() {
|
||||||
return this.textRect;
|
return this.textRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getBoundingRect() {
|
||||||
|
return this.textRect.getBoundingRect();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ESwName;
|
export default ESwName;
|
||||||
|
@ -14,6 +14,7 @@ import EHighlight from '../element/EHighlight';
|
|||||||
import ETriangle from './ETriangle';
|
import ETriangle from './ETriangle';
|
||||||
import store from '@/store/index';
|
import store from '@/store/index';
|
||||||
import ESwDot from './ESwDot';
|
import ESwDot from './ESwDot';
|
||||||
|
import ESpecialCircle from './ESpecialCircle';
|
||||||
|
|
||||||
export default class Switch extends Group {
|
export default class Switch extends Group {
|
||||||
constructor(model, {style, mapDevice}) {
|
constructor(model, {style, mapDevice}) {
|
||||||
@ -221,6 +222,20 @@ export default class Switch extends Group {
|
|||||||
this.add(this.dot);
|
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.shapeModelA);
|
||||||
this.add(this.shapeModelB);
|
this.add(this.shapeModelB);
|
||||||
this.add(this.shapeModelC);
|
this.add(this.shapeModelC);
|
||||||
@ -338,6 +353,7 @@ export default class Switch extends Group {
|
|||||||
this.lockCircle && this.lockCircle.hide(); // 圆形包围框
|
this.lockCircle && this.lockCircle.hide(); // 圆形包围框
|
||||||
this.lockArc && this.lockArc.hide(); // 圆形单锁框
|
this.lockArc && this.lockArc.hide(); // 圆形单锁框
|
||||||
this.name.getNameText().stopAnimation(false);
|
this.name.getNameText().stopAnimation(false);
|
||||||
|
this.name.getTextRect().setStyle({ fill: this.style.backgroundColor });
|
||||||
this.shapeModelC && this.shapeModelC.hide(); // 形状 C
|
this.shapeModelC && this.shapeModelC.hide(); // 形状 C
|
||||||
this.shapeModelA && this.shapeModelA.hide(); // 形状 A
|
this.shapeModelA && this.shapeModelA.hide(); // 形状 A
|
||||||
this.shapeModelB && this.shapeModelB.hide(); // 形状 B
|
this.shapeModelB && this.shapeModelB.hide(); // 形状 B
|
||||||
@ -353,6 +369,8 @@ export default class Switch extends Group {
|
|||||||
this.name && this.name.show();
|
this.name && this.name.show();
|
||||||
this.limitName && this.limitName.show();
|
this.limitName && this.limitName.show();
|
||||||
this.dot && this.dot.hide();
|
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) { // 佛山线路显示
|
if (this.style.Switch.core.graphShow) { // 佛山线路显示
|
||||||
this.shapeModelB.show();
|
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.show();
|
||||||
this.shapeModelC.setColor(this.style.backgroundColor);
|
this.shapeModelC.setColor(this.style.backgroundColor);
|
||||||
}
|
}
|
||||||
@ -388,7 +412,13 @@ export default class Switch extends Group {
|
|||||||
this.shapeModelA.setColor(this.style.Section.line.spareColor);
|
this.shapeModelA.setColor(this.style.Section.line.spareColor);
|
||||||
if (this.style.Switch.core.graphShow) { // 佛山线路显示
|
if (this.style.Switch.core.graphShow) { // 佛山线路显示
|
||||||
this.shapeModelC.show();
|
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({
|
this.shapeModelC.attr({
|
||||||
z: this.z + 6
|
z: this.z + 6
|
||||||
});
|
});
|
||||||
@ -436,6 +466,13 @@ export default class Switch extends Group {
|
|||||||
this.setTextColor(this.style.Switch.text.lossColor);
|
this.setTextColor(this.style.Switch.text.lossColor);
|
||||||
this.style.Switch.text.faultFlashing && this.nameTextAnimation();
|
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.show(); // 西安线路专有
|
||||||
this.lossShow && this.lossShow.animateStyle(true)
|
this.lossShow && this.lossShow.animateStyle(true)
|
||||||
.when(0, { stroke: this.style.backgroundColor })
|
.when(0, { stroke: this.style.backgroundColor })
|
||||||
@ -464,30 +501,37 @@ export default class Switch extends Group {
|
|||||||
if (this.style.Switch.jointImg.fork) {
|
if (this.style.Switch.jointImg.fork) {
|
||||||
this.recover();
|
this.recover();
|
||||||
this.shapeModelB.show();
|
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.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.show();
|
||||||
this.shapeModelA.animateStyle(item => {
|
if (this.style.Switch.core.specialCircle) {
|
||||||
item.animateStyle(true)
|
this.specialCircle.show();
|
||||||
.when(0, { stroke: this.style.backgroundColor })
|
this.specialCircle.setColor(this.style.Switch.core.forkActionColor);
|
||||||
.when(1000, { stroke: 'red' })
|
// 大铁线路III型 定反位 实心小圆圈
|
||||||
.when(2000, { stroke: this.style.backgroundColor })
|
this.specialCircle && this.specialCircle.animate();
|
||||||
.start();
|
} else {
|
||||||
});
|
this.shapeModelB.animateStyle(item => {
|
||||||
this.setTextColor('red');
|
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 {
|
} else {
|
||||||
this.setLossAction(fault); // 若不是具有特殊的挤岔,则显示状态和失表一样
|
this.setLossAction(fault); // 若不是具有特殊的挤岔,则显示状态和失表一样
|
||||||
}
|
}
|
||||||
@ -521,6 +565,45 @@ export default class Switch extends Group {
|
|||||||
this.dot.setColor(this.style.Switch.switchDot.monoLockColor);
|
this.dot.setColor(this.style.Switch.switchDot.monoLockColor);
|
||||||
}
|
}
|
||||||
this.setTextColor(this.style.Switch.text.monolockLocationColor);
|
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) {
|
if (this.style.Switch.text.block) {
|
||||||
this.setHasTextBorder(1);
|
this.setHasTextBorder(1);
|
||||||
}
|
}
|
||||||
|
//
|
||||||
if (this.style.Switch.text.blockText) {
|
if (this.style.Switch.text.blockText) {
|
||||||
this.setTextColor(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 (this.style.Switch.jointImg.trapezoidBlock) { // 范围且封锁时显示
|
||||||
if ( pos == 'N') {
|
if ( pos == 'N') {
|
||||||
@ -721,6 +808,8 @@ export default class Switch extends Group {
|
|||||||
// model.pos == 'NO' || model.pos == 'EX';
|
// model.pos == 'NO' || model.pos == 'EX';
|
||||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||||
|
|
||||||
|
// model.pos = 'EX';
|
||||||
|
|
||||||
if (model.pos == 'N') {
|
if (model.pos == 'N') {
|
||||||
this.switchPosition = 'normal';
|
this.switchPosition = 'normal';
|
||||||
this.setLocationAction(model); /** 定位*/
|
this.setLocationAction(model); /** 定位*/
|
||||||
@ -742,9 +831,9 @@ export default class Switch extends Group {
|
|||||||
this.setForkAction(model.fault); // 挤岔
|
this.setForkAction(model.fault); // 挤岔
|
||||||
}
|
}
|
||||||
model.isCiConfirm && this.setCiConfirm(); // 道岔使能显示
|
model.isCiConfirm && this.setCiConfirm(); // 道岔使能显示
|
||||||
|
|
||||||
model.singleLock && this.setMonolock(model.pos); // 道岔单锁
|
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.blockade && this.block(model.pos); // 道岔封锁
|
||||||
model.singleLock && model.blockade && this.blockMonolock(); // 单锁&锁闭状态
|
model.singleLock && model.blockade && this.blockMonolock(); // 单锁&锁闭状态
|
||||||
const path = window.location.href;
|
const path = window.location.href;
|
||||||
@ -790,10 +879,15 @@ export default class Switch extends Group {
|
|||||||
this.setHasTextBorder(1, this.style.Switch.text.overlapLockBorderColor);
|
this.setHasTextBorder(1, this.style.Switch.text.overlapLockBorderColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 道岔侧防
|
||||||
handleFpLock() {
|
handleFpLock() {
|
||||||
if (this.style.Switch.text.fpLockBorderColor) {
|
if (this.style.Switch.text.fpLockBorderColor) {
|
||||||
this.setHasTextBorder(1, 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) {
|
getShapeTipPoint(opts) {
|
||||||
let rect;
|
let rect;
|
||||||
|
@ -201,12 +201,12 @@ export default {
|
|||||||
{label: '计轴故障', value: 'FAULT'},
|
{label: '计轴故障', value: 'FAULT'},
|
||||||
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}
|
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}
|
||||||
];
|
];
|
||||||
} else if (selected._type === 'Section' && this.popClass === 'datie-02__systerm'){
|
} else if (selected._type === 'Section' && this.popClass === 'datie-02__systerm') {
|
||||||
this.faultList = [
|
this.faultList = [
|
||||||
{label: '计轴故障', value: 'FAULT'},
|
{label: '电路故障', value: 'FAULT'}
|
||||||
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}
|
// {label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}
|
||||||
];
|
];
|
||||||
} else if (selected._type === 'Switch' && this.popClass === 'haerbin-01__systerm') {
|
} else if (selected._type === 'Switch' && this.popClass === 'haerbin-01__systerm') {
|
||||||
this.faultList = [
|
this.faultList = [
|
||||||
{label: '失表', value: 'SPLIT'},
|
{label: '失表', value: 'SPLIT'},
|
||||||
{label: '定位失表', value: 'NORMAL_SPLIT'},
|
{label: '定位失表', value: 'NORMAL_SPLIT'},
|
||||||
@ -215,16 +215,16 @@ export default {
|
|||||||
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'},
|
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'},
|
||||||
{label: '计轴故障', value: 'AXLE_FAULT'}
|
{label: '计轴故障', value: 'AXLE_FAULT'}
|
||||||
];
|
];
|
||||||
} else if(selected._type === 'Switch' && this.popClass === 'datie-02__systerm') {
|
} else if (selected._type === 'Switch' && this.popClass === 'datie-02__systerm') {
|
||||||
this.faultList = [
|
this.faultList = [
|
||||||
{label: '失表', value: 'SPLIT'},
|
{label: '失表', value: 'SPLIT'},
|
||||||
{label: '定位失表', value: 'NORMAL_SPLIT'},
|
{label: '定位失表', value: 'NORMAL_SPLIT'},
|
||||||
{label: '反位失表', value: 'REVERSE_SPLIT'},
|
{label: '反位失表', value: 'REVERSE_SPLIT'},
|
||||||
{label: '挤岔', value: 'SQUEEZE'},
|
// {label: '挤岔', value: 'SQUEEZE'},
|
||||||
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'},
|
// {label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'},
|
||||||
{label: '红光带故障', value: 'AXLE_FAULT'}
|
{label: '电路故障', value: 'AXLE_FAULT'}
|
||||||
];
|
];
|
||||||
} else if (selected._type === 'Section' && this.popClass === 'xian-01__systerm') {
|
} else if (selected._type === 'Section' && this.popClass === 'xian-01__systerm') {
|
||||||
this.faultList = [
|
this.faultList = [
|
||||||
{label: '红光带故障', value: 'FAULT'},
|
{label: '红光带故障', value: 'FAULT'},
|
||||||
{label: '粉光带故障', value: 'CBTC_OCCUPIED_FAULT'},
|
{label: '粉光带故障', value: 'CBTC_OCCUPIED_FAULT'},
|
||||||
|
@ -240,6 +240,16 @@ export const menuOperate = {
|
|||||||
// 道岔钩锁
|
// 道岔钩锁
|
||||||
operation: OperationEvent.Switch.hookLock.menu.operation,
|
operation: OperationEvent.Switch.hookLock.menu.operation,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK
|
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:{
|
StationStand:{
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
<div style="margin-right: 10px;">车站</div>
|
<div style="margin-right: 10px;">车站</div>
|
||||||
<el-select v-model="stationCode" size="mini" @change="stationChange">
|
<el-select v-model="stationCode" size="mini" @change="stationChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stationList"
|
v-for="item in showStationList"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
@ -144,7 +144,8 @@ export default {
|
|||||||
sheetList: [{ label: '历史进路', value: 'historyRoute' }],
|
sheetList: [{ label: '历史进路', value: 'historyRoute' }],
|
||||||
sequenceList: [],
|
sequenceList: [],
|
||||||
sequenceMap: {},
|
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: {
|
computed: {
|
||||||
@ -186,23 +187,42 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.map.showCentralizedStationCode': function (val) {
|
||||||
|
this.initShowStationList(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
EventBus.$on('bottomTableShowOrHidden', () => {
|
EventBus.$on('bottomTableShowOrHidden', () => {
|
||||||
this.showTable = !this.showTable;
|
this.showTable = !this.showTable;
|
||||||
});
|
});
|
||||||
if (this.stationList && this.stationList.length) {
|
// if (this.stationList && this.stationList.length) {
|
||||||
this.stationCode = this.stationList[0].code;
|
// this.stationCode = this.stationList[0].code;
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow() {
|
doShow() {
|
||||||
|
this.initShowStationList(this.$store.state.map.showCentralizedStationCode);
|
||||||
this.showTable = true;
|
this.showTable = true;
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.showTable = false;
|
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) {
|
getRouteStatus(status) {
|
||||||
if (status === '2') {
|
if (status === '2') {
|
||||||
return '触发完成';
|
return '触发完成';
|
||||||
|
@ -34,7 +34,8 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
model:{
|
model:{
|
||||||
stationCode:'',
|
stationCode:'',
|
||||||
runPlanCode:''
|
runPlanCode:'',
|
||||||
|
status:1
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -59,11 +59,14 @@
|
|||||||
<notice-info v-if="isCtc" ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
<notice-info v-if="isCtc" ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||||
<cmdManage v-if="isCtc" ref="cmdManage" />
|
<cmdManage v-if="isCtc" ref="cmdManage" />
|
||||||
<signedCmd v-if="isCtc" ref="signedCmd" @signedCmdClose="signedCmdClose" @changeSignedStatus="changeSignedStatus" />
|
<signedCmd v-if="isCtc" ref="signedCmd" @signedCmdClose="signedCmdClose" @changeSignedStatus="changeSignedStatus" />
|
||||||
|
<div id="playBtn" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters, mapState } from 'vuex';
|
import { mapGetters, mapState } from 'vuex';
|
||||||
|
import { btts } from '@/utils/baidu_tts_cors';
|
||||||
|
import { getBaiduToken } from '@/api/voice';
|
||||||
import MenuSignal from './menuSignal';
|
import MenuSignal from './menuSignal';
|
||||||
import MenuButton from './menuButton';
|
import MenuButton from './menuButton';
|
||||||
import MenuStationStand from './menuStationStand';
|
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 CtcBarIcon18 from '@/assets/ctc_icon/pic18.png';
|
||||||
import cmdManage from '@/views/dispatcherStationManage/cmdManage.vue';
|
import cmdManage from '@/views/dispatcherStationManage/cmdManage.vue';
|
||||||
import signedCmd from '@/views/dispatcherStationManage/signedCmd.vue';
|
import signedCmd from '@/views/dispatcherStationManage/signedCmd.vue';
|
||||||
|
import {getRunplanInStation} from '@/api/runplan';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Menus',
|
name: 'Menus',
|
||||||
@ -179,7 +183,9 @@ export default {
|
|||||||
ctcBarIcon15: CtcBarIcon15,
|
ctcBarIcon15: CtcBarIcon15,
|
||||||
ctcBarIcon16: CtcBarIcon16,
|
ctcBarIcon16: CtcBarIcon16,
|
||||||
ctcBarIcon17: CtcBarIcon17,
|
ctcBarIcon17: CtcBarIcon17,
|
||||||
ctcBarIcon18: CtcBarIcon18
|
ctcBarIcon18: CtcBarIcon18,
|
||||||
|
audio: null,
|
||||||
|
voiceBroadcastToken: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -224,11 +230,28 @@ export default {
|
|||||||
if (this.isCtc) {
|
if (this.isCtc) {
|
||||||
this.getRailwaySimulationRunplanSend();
|
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() {
|
mounted() {
|
||||||
|
this.group = this.$route.query.group;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('config/updateMenuBar');
|
this.$store.dispatch('config/updateMenuBar');
|
||||||
|
if (this.isCtc) {
|
||||||
|
this.getRunplanInStationData();
|
||||||
|
}
|
||||||
const _that = this;
|
const _that = this;
|
||||||
window.onclick = function (e) {
|
window.onclick = function (e) {
|
||||||
if (!_that.$store.state.training.trainingStart) {
|
if (!_that.$store.state.training.trainingStart) {
|
||||||
@ -248,6 +271,43 @@ export default {
|
|||||||
this.$store.dispatch('map/setPictureDeviceMap', {});
|
this.$store.dispatch('map/setPictureDeviceMap', {});
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
changeSignedStatus(info) {
|
||||||
this.isCtc && this.$refs.cmdManage.changeSignedStatus(info);
|
this.isCtc && this.$refs.cmdManage.changeSignedStatus(info);
|
||||||
},
|
},
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
<center><b>按</b><b>钮</b></center>
|
<center><b>按</b><b>钮</b></center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</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'}">
|
<span :style="{color: operation === MixinCommand.functionButton.button.operation ? '#ccc':'black'}">
|
||||||
<center><b>功</b><b>能</b></center>
|
<center><b>功</b><b>能</b></center>
|
||||||
<center><b>按</b><b>钮</b></center>
|
<center><b>按</b><b>钮</b></center>
|
||||||
@ -254,6 +254,8 @@ export default {
|
|||||||
this.updateButtonShow(val, old);
|
this.updateButtonShow(val, old);
|
||||||
},
|
},
|
||||||
'$store.state.menuOperation.selectedCount': function (val) {
|
'$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();
|
this.selectedChange();
|
||||||
},
|
},
|
||||||
'$store.state.map.clearButtonCount': function(val) {
|
'$store.state.map.clearButtonCount': function(val) {
|
||||||
@ -397,7 +399,7 @@ export default {
|
|||||||
},
|
},
|
||||||
buttonDown(operation, commandTypeList) {
|
buttonDown(operation, commandTypeList) {
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
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();
|
this.clearOperate();
|
||||||
if (operation != this.Command.cancel.clearMbm.operation) {
|
if (operation != this.Command.cancel.clearMbm.operation) {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -671,6 +673,7 @@ export default {
|
|||||||
// this.handleGuideLock(model);
|
// this.handleGuideLock(model);
|
||||||
// this.handleGuideSignal(model);
|
// this.handleGuideSignal(model);
|
||||||
// } else
|
// } else
|
||||||
|
debugger;
|
||||||
if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
||||||
if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
||||||
this.handelTotalCancel(model);
|
this.handelTotalCancel(model);
|
||||||
@ -689,22 +692,37 @@ export default {
|
|||||||
this.arrangementRouteOperation(this.deviceList);
|
this.arrangementRouteOperation(this.deviceList);
|
||||||
} else if (buttonOperation === this.Signal.guide.button.operation ) {
|
} else if (buttonOperation === this.Signal.guide.button.operation ) {
|
||||||
this.handleGuideSignal(model);
|
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 {
|
} else {
|
||||||
this.clearOperate();
|
this.clearOperate();
|
||||||
}
|
}
|
||||||
} else if (!buttonOperation) {
|
} else if (!buttonOperation) {
|
||||||
if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE' ) {
|
// if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE' ) {
|
||||||
this.handleGuideSignal(model);
|
// this.handleGuideSignal(model);
|
||||||
} else if (model._type === 'SignalButton' && model.type === 'CHANGE_DIRECTION') {
|
// } else if (model._type === 'SignalButton' && model.type === 'CHANGE_DIRECTION') {
|
||||||
// 改方操作
|
// // 改方操作
|
||||||
// this.changeDirection(model);
|
// // this.changeDirection(model);
|
||||||
this.clearOperate();
|
// this.clearOperate();
|
||||||
} else if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) || (model._type === 'Signal' && !model.blockade)) {
|
// } else if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) || (model._type === 'Signal' && !model.blockade)) {
|
||||||
this.deviceList.push(model);
|
// this.deviceList.push(model);
|
||||||
this.arrangementRouteOperation(this.deviceList);
|
// this.arrangementRouteOperation(this.deviceList);
|
||||||
} else {
|
// } else {
|
||||||
this.clearOperate();
|
// 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(); }
|
} else { this.clearOperate(); }
|
||||||
if (this.timeNode) { this.timeNode = 0; }
|
if (this.timeNode) { this.timeNode = 0; }
|
||||||
},
|
},
|
||||||
@ -789,6 +807,133 @@ export default {
|
|||||||
},
|
},
|
||||||
commandClear() {
|
commandClear() {
|
||||||
this.clearOperate();
|
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 // 1按下、0弹起
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 改方
|
||||||
|
'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 // 1按下、0弹起
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 接辅助按钮
|
||||||
|
'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();
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -121,7 +121,6 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
console.log(this.buttonOperation, '***********');
|
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && (!this.buttonOperation || this.$route.query.ctc)) {
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && (!this.buttonOperation || this.$route.query.ctc)) {
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
} else {
|
} else {
|
||||||
@ -146,7 +145,7 @@ export default {
|
|||||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
this.menu = this.menuNormal.Local;
|
this.menu = this.menuNormal.Local;
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
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; });
|
this.menu.forEach(item => { item.disabled = true; });
|
||||||
} else { this.menu.forEach(item => { item.disabled = false; }); }
|
} else { this.menu.forEach(item => { item.disabled = false; }); }
|
||||||
} else {
|
} else {
|
||||||
|
@ -210,7 +210,7 @@ export default {
|
|||||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
this.menu = this.menuNormal.Local;
|
this.menu = this.menuNormal.Local;
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
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; });
|
this.menu.forEach(item => { item.disabled = true; });
|
||||||
} else { this.menu.forEach(item => { item.disabled = false; }); }
|
} else { this.menu.forEach(item => { item.disabled = false; }); }
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
|
@ -200,7 +200,7 @@ export default {
|
|||||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
this.menu = this.menuNormal.Local;
|
this.menu = this.menuNormal.Local;
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
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; });
|
this.menu.forEach(item => { item.disabled = true; });
|
||||||
} else { this.menu.forEach(item => { item.disabled = false; }); }
|
} else { this.menu.forEach(item => { item.disabled = false; }); }
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
|
@ -239,7 +239,7 @@ export default {
|
|||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
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; });
|
this.menu.forEach(item => { item.disabled = true; });
|
||||||
} else { this.menu.forEach(item => { item.disabled = false; }); }
|
} else { this.menu.forEach(item => { item.disabled = false; }); }
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div :class="scope.row.twinkle?'flashTrip noChange':'noChange'" style="color:#000">
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -652,6 +652,14 @@ export default {
|
|||||||
const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
|
||||||
this.initDate(date);
|
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) {
|
'$store.state.socket.railCtcRunplanChange': function (val) {
|
||||||
this.loadData();
|
this.loadData();
|
||||||
},
|
},
|
||||||
@ -721,6 +729,7 @@ export default {
|
|||||||
loadData() {
|
loadData() {
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
const railCtcRunplanInitMsg = copyAssign({}, this.$store.state.socket.railCtcRunplanInitMsg);
|
const railCtcRunplanInitMsg = copyAssign({}, this.$store.state.socket.railCtcRunplanInitMsg);
|
||||||
|
console.log(railCtcRunplanInitMsg, 'railCtcRunplanInitMsg');
|
||||||
this.tableData = Object.values(railCtcRunplanInitMsg).filter(data=>{
|
this.tableData = Object.values(railCtcRunplanInitMsg).filter(data=>{
|
||||||
if (data.departRunPlan) {
|
if (data.departRunPlan) {
|
||||||
// data.departRunPlan.planTime = this.coverTime(data.departRunPlan.planTime);
|
// data.departRunPlan.planTime = this.coverTime(data.departRunPlan.planTime);
|
||||||
@ -822,8 +831,7 @@ export default {
|
|||||||
};
|
};
|
||||||
commitOperate(menuOperate.CTC.setTransfinite, params, 3).then(({valid})=>{
|
commitOperate(menuOperate.CTC.setTransfinite, params, 3).then(({valid})=>{
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
// if (valid) {}
|
||||||
}
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
@ -839,8 +847,7 @@ export default {
|
|||||||
};
|
};
|
||||||
commitOperate(menuOperate.CTC.modifyTrackSection, params, 3).then(({valid})=>{
|
commitOperate(menuOperate.CTC.modifyTrackSection, params, 3).then(({valid})=>{
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
// if (valid) {}
|
||||||
}
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
@ -869,8 +876,7 @@ export default {
|
|||||||
// element.departRunPlan.sectionCode
|
// element.departRunPlan.sectionCode
|
||||||
commitOperate(menuOperate.CTC.modifyTrackSection, params, 3).then(({valid})=>{
|
commitOperate(menuOperate.CTC.modifyTrackSection, params, 3).then(({valid})=>{
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
// if (valid) {}
|
||||||
}
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
@ -2,18 +2,23 @@
|
|||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||||
|
<password-box ref="passwordBox" pop-class="chengdou-03__systerm" @checkOver="passWordCommit" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
// OperateMode
|
// OperateMode
|
||||||
|
import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordInputBox';
|
||||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
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 {
|
export default {
|
||||||
name: 'SignalMenu',
|
name: 'SignalMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
|
PasswordBox,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -57,8 +62,13 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '加封',
|
label: '加封',
|
||||||
handler: this.seal
|
handler: this.lock,
|
||||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
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);
|
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() {
|
signalTotalCancle() {
|
||||||
|
const model = this.selected; // 选择设备
|
||||||
|
commitOperate(menuOperate.Signal.signalTotalCancle, { signalCode: model._type === 'Signal' ? model.code : model.signalCode}, 3).then(({valid, operate}) => {
|
||||||
|
if (valid) {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 总人解
|
// 总人解
|
||||||
humanTrainRoute() {
|
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() {
|
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() {
|
doClose() {
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<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" />
|
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -12,13 +12,13 @@ import { DeviceMenu } from '@/scripts/ConstDic';
|
|||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
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 {
|
export default {
|
||||||
name: 'SwitchMenu',
|
name: 'SwitchMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
SwitchControl,
|
// SwitchControl,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -69,8 +69,27 @@ export default {
|
|||||||
label: '解封',
|
label: '解封',
|
||||||
handler: this.unblock,
|
handler: this.unblock,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_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: [
|
Center: [
|
||||||
]
|
]
|
||||||
@ -89,53 +108,78 @@ export default {
|
|||||||
methods:{
|
methods:{
|
||||||
// 道岔总定
|
// 道岔总定
|
||||||
locate() {
|
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) {
|
if (valid) {
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
// 道岔总反
|
// 道岔总反
|
||||||
reverse() {
|
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) {
|
if (valid) {
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔单锁
|
// 道岔单锁
|
||||||
lock() {
|
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) {
|
if (valid) {
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔解锁
|
// 道岔单解
|
||||||
unlock() {
|
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) {
|
if (valid) {
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔封锁
|
// 道岔封锁
|
||||||
block() {
|
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) {
|
if (valid) {
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔解封
|
// 道岔解封
|
||||||
unblock() {
|
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) {
|
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) {
|
doShow(point) {
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
|
@ -45,7 +45,11 @@ export default {
|
|||||||
/** 引导总锁 */
|
/** 引导总锁 */
|
||||||
CMD_SWITCH_MASTER_LOCK: {value:'Switch_Master_Lock', label: '设置引导总锁' },
|
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: '道岔取消分路不良'}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 控制模式操作
|
// 控制模式操作
|
||||||
|
@ -1162,6 +1162,20 @@ export const OperationEvent = {
|
|||||||
operation: '11b1',
|
operation: '11b1',
|
||||||
domId: '_Tips-Switch-ForceCancelSpeed-Menu{BOTTOM}'
|
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}'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -203,18 +203,19 @@ function handle(state, data) {
|
|||||||
state.railCtcStatusMsg = msg;
|
state.railCtcStatusMsg = msg;
|
||||||
break;
|
break;
|
||||||
// 大铁项目 ctc 运行图初始化信息
|
// 大铁项目 ctc 运行图初始化信息
|
||||||
case 'SIMULATION_CTC_RUN_PLAN_INIT':
|
// case 'SIMULATION_CTC_RUN_PLAN_INIT':
|
||||||
msg.forEach(element => {
|
// msg.forEach(element => {
|
||||||
const tripNumberDe = element.departRunPlan && element.departRunPlan.tripNumber;
|
// const tripNumberDe = element.departRunPlan && element.departRunPlan.tripNumber;
|
||||||
const tripNumberAr = element.arriveRunPlan && element.arriveRunPlan.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 (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; }
|
// if (tripNumberAr) { parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr; }
|
||||||
const code = element.stationCode + '' + element.code;
|
// const code = element.stationCode + '' + element.code;
|
||||||
state.railCtcRunplanInitMsg[code] = element;
|
// state.railCtcRunplanInitMsg[code] = element;
|
||||||
});
|
// });
|
||||||
break;
|
// break;
|
||||||
// 大铁项目 ctc 运行图改变信息
|
// 大铁项目 ctc 运行图改变信息
|
||||||
case 'SIMULATION_CTC_RUN_PLAN_CHANGE':
|
case 'SIMULATION_CTC_RUN_PLAN_CHANGE':
|
||||||
|
state.voiceBroadcastMsgs = [];
|
||||||
msg.forEach(element => {
|
msg.forEach(element => {
|
||||||
const tripNumberDe = element.departRunPlan && element.departRunPlan.tripNumber;
|
const tripNumberDe = element.departRunPlan && element.departRunPlan.tripNumber;
|
||||||
const tripNumberAr = element.arriveRunPlan && element.arriveRunPlan.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;
|
parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr;
|
||||||
}
|
}
|
||||||
const code = element.stationCode + '' + element.code;
|
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);
|
state.railCtcRunplanInitMsg[code] = copyAssign(state.railCtcRunplanInitMsg[code] || {}, element);
|
||||||
});
|
});
|
||||||
|
if (state.voiceBroadcastMsgs.length) {
|
||||||
|
state.voiceBroadcastChange++;
|
||||||
|
}
|
||||||
state.railCtcRunplanChange++;
|
state.railCtcRunplanChange++;
|
||||||
break;
|
break;
|
||||||
// 大铁项目 ctc 调度发布行车计划 给车站下发消息
|
// 大铁项目 ctc 调度发布行车计划 给车站下发消息
|
||||||
@ -460,7 +467,9 @@ const socket = {
|
|||||||
railCtcStationManageRpMsg:{}, // 大铁项目 ctc 车务管理 端运行图信息
|
railCtcStationManageRpMsg:{}, // 大铁项目 ctc 车务管理 端运行图信息
|
||||||
railCtcStationManageRpChange:0, // 大铁项目 ctc 车务管理 运行图信息变化
|
railCtcStationManageRpChange:0, // 大铁项目 ctc 车务管理 运行图信息变化
|
||||||
railwaySimulationRunplanSendMap:{}, // 大铁项目 调度台 发布 行车计划
|
railwaySimulationRunplanSendMap:{}, // 大铁项目 调度台 发布 行车计划
|
||||||
railwaySimulationRunplanSendChange:0 // 大铁项目 调度台 发布 行车计划变化
|
railwaySimulationRunplanSendChange:0, // 大铁项目 调度台 发布 行车计划变化
|
||||||
|
voiceBroadcastMsgs: [], // 语音播报信息
|
||||||
|
voiceBroadcastChange: 0 // 语音播报信息变化
|
||||||
// railwaySimulationRpMsg:{}, // 大铁项目 调度台 调度台
|
// railwaySimulationRpMsg:{}, // 大铁项目 调度台 调度台
|
||||||
// railwaySimulationRpChange:0 // 大铁项目 调度台 运行图信息变化
|
// railwaySimulationRpChange:0 // 大铁项目 调度台 运行图信息变化
|
||||||
},
|
},
|
||||||
@ -558,6 +567,16 @@ const socket = {
|
|||||||
},
|
},
|
||||||
resetRailCtcRunplanInitMsg: (state) => {
|
resetRailCtcRunplanInitMsg: (state) => {
|
||||||
state.railCtcRunplanInitMsg = {};
|
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 }) => {
|
resetRailCtcRunplanInitMsg:({ commit }) => {
|
||||||
commit('resetRailCtcRunplanInitMsg');
|
commit('resetRailCtcRunplanInitMsg');
|
||||||
|
},
|
||||||
|
initRailCtcRunplanInitMsg:({ commit }, list) => {
|
||||||
|
commit('initRailCtcRunplanInitMsg', list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
118
src/utils/baidu_tts_cors.js
Normal file
118
src/utils/baidu_tts_cors.js
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
@ -150,7 +150,87 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="查询" name="search">
|
<el-tab-pane label="查询" name="search">
|
||||||
<div class="search-box">
|
<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>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@ -337,8 +417,8 @@ export default {
|
|||||||
author: '',
|
author: '',
|
||||||
receiverIds: [],
|
receiverIds: [],
|
||||||
type: 'NORMAL',
|
type: 'NORMAL',
|
||||||
content: '',
|
content: ''
|
||||||
allSigned: ''
|
// allSigned: ''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
title: [
|
title: [
|
||||||
@ -356,10 +436,33 @@ export default {
|
|||||||
active2: true,
|
active2: true,
|
||||||
active3: true,
|
active3: true,
|
||||||
active4: true,
|
active4: true,
|
||||||
|
active5: true,
|
||||||
|
timeTypeRadio: '1',
|
||||||
numTime: 24,
|
numTime: 24,
|
||||||
seachData: [],
|
seachData: [],
|
||||||
cacheTableData: [],
|
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: {
|
computed: {
|
||||||
@ -462,8 +565,67 @@ export default {
|
|||||||
beforeDestroy() {},
|
beforeDestroy() {},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods:{
|
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) {
|
setCurrentRow(obj, refName) {
|
||||||
const tableArr = ['table1', 'table2', 'table3', 'table4'];
|
const tableArr = ['table1', 'table2', 'table3', 'table4', 'table5'];
|
||||||
tableArr.forEach(key => {
|
tableArr.forEach(key => {
|
||||||
if (key != refName) {
|
if (key != refName) {
|
||||||
this.$refs[key] && this.$refs[key].setCurrentRow();
|
this.$refs[key] && this.$refs[key].setCurrentRow();
|
||||||
@ -475,7 +637,10 @@ export default {
|
|||||||
handleCurrentChange(obj, refName) {
|
handleCurrentChange(obj, refName) {
|
||||||
if (!obj) { return; }
|
if (!obj) { return; }
|
||||||
this.currentInfo = obj;
|
this.currentInfo = obj;
|
||||||
this.command = {...obj};
|
// this.command = {...obj};
|
||||||
|
Object.keys(this.command).forEach(key => {
|
||||||
|
this.command[key] = obj[key] || '';
|
||||||
|
});
|
||||||
this.setCurrentRow(obj, refName);
|
this.setCurrentRow(obj, refName);
|
||||||
const infoList = Object.keys(this.currentInfo.receiverInfos || {});
|
const infoList = Object.keys(this.currentInfo.receiverInfos || {});
|
||||||
if (infoList.length) {
|
if (infoList.length) {
|
||||||
@ -525,6 +690,24 @@ export default {
|
|||||||
console.log('刷新');
|
console.log('刷新');
|
||||||
this.searchCmd();
|
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() {
|
createCmd() {
|
||||||
this.$confirm('当前调度命令已经被编辑修改过了,你要放弃所有的修改吗?', '操作提示', {
|
this.$confirm('当前调度命令已经被编辑修改过了,你要放弃所有的修改吗?', '操作提示', {
|
||||||
confirmButtonText: '是',
|
confirmButtonText: '是',
|
||||||
@ -551,8 +734,8 @@ export default {
|
|||||||
author: '',
|
author: '',
|
||||||
receiverIds: [],
|
receiverIds: [],
|
||||||
type: 'NORMAL',
|
type: 'NORMAL',
|
||||||
content: '',
|
content: ''
|
||||||
allSigned: ''
|
// allSigned: ''
|
||||||
};
|
};
|
||||||
this.currentInfo = {};
|
this.currentInfo = {};
|
||||||
this.$refs.table && this.$refs.table.clearSelection();
|
this.$refs.table && this.$refs.table.clearSelection();
|
||||||
@ -639,11 +822,15 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
searchCmd() {
|
searchCmd() {
|
||||||
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
|
return new Promise((resolve, reject) => {
|
||||||
console.log(res, '---res----');
|
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
|
||||||
this.seachData = res.data;
|
console.log(res, '---res----');
|
||||||
}).catch(error => {
|
this.seachData = res.data;
|
||||||
this.$messageBox('查询调度命令失败:' + error.message);
|
resolve();
|
||||||
|
}).catch(error => {
|
||||||
|
this.$messageBox('查询调度命令失败:' + error.message);
|
||||||
|
reject(error.message);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -687,12 +874,49 @@ export default {
|
|||||||
color: blue;
|
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 {
|
/deep/ .el-tabs__item {
|
||||||
height: 30px !important;
|
height: 30px !important;
|
||||||
line-height: 30px !important;
|
line-height: 30px !important;
|
||||||
}
|
}
|
||||||
.middle {
|
.middle, .left {
|
||||||
/deep/ .el-form-item {
|
/deep/ .el-form-item {
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
.el-form-item__error {
|
.el-form-item__error {
|
||||||
@ -720,4 +944,7 @@ export default {
|
|||||||
.dispatcher-cmd .el-dialog {
|
.dispatcher-cmd .el-dialog {
|
||||||
margin-top: 8vh !important;
|
margin-top: 8vh !important;
|
||||||
}
|
}
|
||||||
|
.dispatcher-cmd .el-tabs--border-card>.el-tabs__content {
|
||||||
|
padding: 5px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<div style="height: 500px; overflow-y: auto;background: #DFE3E6;padding: 7px;">
|
<div style="height: 500px; overflow-y: auto;background: #DFE3E6;padding: 7px;">
|
||||||
<div style="width: 100%;display: flex;align-items: center;margin-bottom: 10px;">
|
<div style="width: 100%;display: flex;align-items: center;margin-bottom: 10px;">
|
||||||
<div
|
<div
|
||||||
v-for="item in stationList"
|
v-for="item in showStationList"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
class="tab-box"
|
class="tab-box"
|
||||||
:style="{background: selectCode === item.code ? '#F1F1F1': '#DBDBDB', color: selectCode === item.code ? '#000': '#ccc'}"
|
:style="{background: selectCode === item.code ? '#F1F1F1': '#DBDBDB', color: selectCode === item.code ? '#000': '#ccc'}"
|
||||||
@ -214,7 +214,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<div style="width: 100%;display: flex;align-items: center;margin: 5px 0;">
|
<div style="width: 100%;display: flex;align-items: center;margin: 5px 0;">
|
||||||
<div
|
<div
|
||||||
v-for="item in stationList"
|
v-for="item in showStationList"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
class="tab-box"
|
class="tab-box"
|
||||||
:style="{background: selectCode1 === item.code ? '#F1F1F1': '#DBDBDB', color: selectCode1 === item.code ? '#000': '#ccc'}"
|
:style="{background: selectCode1 === item.code ? '#F1F1F1': '#DBDBDB', color: selectCode1 === item.code ? '#000': '#ccc'}"
|
||||||
@ -335,7 +335,8 @@ export default {
|
|||||||
sequenceList: [],
|
sequenceList: [],
|
||||||
readOnlyMap: {},
|
readOnlyMap: {},
|
||||||
standTrackSectionMap: {},
|
standTrackSectionMap: {},
|
||||||
trackList: []
|
trackList: [],
|
||||||
|
showStationList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -436,6 +437,9 @@ export default {
|
|||||||
this.standTrackSectionMap[item.code] = { trackName: item.name, occupied: false, belongStation:item.belongStation, lineMap: {}};
|
this.standTrackSectionMap[item.code] = { trackName: item.name, occupied: false, belongStation:item.belongStation, lineMap: {}};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
'$store.state.map.showCentralizedStationCode': function (val) {
|
||||||
|
this.initShowStationList(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -444,11 +448,26 @@ export default {
|
|||||||
handleClose() {
|
handleClose() {
|
||||||
this.dialogVisible = false;
|
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() {
|
doShow() {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
if (this.stationList[0]) {
|
this.initShowStationList(this.$store.state.map.showCentralizedStationCode);
|
||||||
this.selectStandCode(this.stationList[0].code);
|
if (this.showStationList && this.showStationList.length) {
|
||||||
this.selectStandCode1(this.stationList[0].code);
|
this.selectStandCode(this.$store.state.map.showCentralizedStationCode);
|
||||||
|
this.selectStandCode1(this.$store.state.map.showCentralizedStationCode);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectStandCode(code) {
|
selectStandCode(code) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="schema" :style="{top: offset+'px'}">
|
<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-select v-model="speed" style="width: 100px;" size="small" @change="speedChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in speedList"
|
v-for="item in speedList"
|
||||||
@ -12,7 +12,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
<template v-if="!dataError">
|
<template v-if="!dataError">
|
||||||
<el-button-group v-if="project !== 'bjd'">
|
<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="goRpManage">管理终端</el-button> -->
|
||||||
<!-- <el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goDsManage">调度台</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>
|
<el-button v-if="isLocalStation && $route.query.lineCode!='08' && $route.query.lineCode!='16' && project !== 'teaching'" size="small" @click="goIbp">IBP盘</el-button>
|
||||||
|
@ -43,6 +43,11 @@ export default {
|
|||||||
},
|
},
|
||||||
'$store.state.training.simulationUserList': function(val) {
|
'$store.state.training.simulationUserList': function(val) {
|
||||||
this.initData();
|
this.initData();
|
||||||
|
},
|
||||||
|
'$store.state.socket.simulationRoleList':function(list) {
|
||||||
|
if (list && list.length) { // 人员变化监控
|
||||||
|
this.checkRoleChange(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -128,6 +133,27 @@ export default {
|
|||||||
if (this.showMemberId) {
|
if (this.showMemberId) {
|
||||||
this.switchStationMode( 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);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -265,6 +265,7 @@ export default {
|
|||||||
mapId:this.$route.query.mapId,
|
mapId:this.$route.query.mapId,
|
||||||
project: this.project,
|
project: this.project,
|
||||||
newApi: false,
|
newApi: false,
|
||||||
|
joint: true,
|
||||||
ctc: true,
|
ctc: true,
|
||||||
try: this.$route.query.try || 0,
|
try: this.$route.query.try || 0,
|
||||||
token:getToken(),
|
token:getToken(),
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
<el-form-item label="画面类型:" prop="type">
|
<el-form-item label="画面类型:" prop="type">
|
||||||
<el-select v-model="ruleForm.type" placeholder="请选择画面类型">
|
<el-select v-model="ruleForm.type" placeholder="请选择画面类型">
|
||||||
<el-option label="站间透明" value="lucency" />
|
<el-option label="站间透明" value="lucency" />
|
||||||
|
<el-option label="连锁车站" value="chainStation" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属车站:" prop="stationCode">
|
<el-form-item label="所属车站:" prop="stationCode">
|
||||||
|
@ -69,6 +69,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
reloadMenuComponent(lineCode) {
|
||||||
|
this.menus = this.$theme.loadMenuComponent(lineCode); // 加载menu
|
||||||
|
this.$store.commit('training/notifyGetCommandDefinition', lineCode); // 重新加载线路指令
|
||||||
|
},
|
||||||
// 获取设备数据
|
// 获取设备数据
|
||||||
getDeviceByEm(em) {
|
getDeviceByEm(em) {
|
||||||
var device = this.$store.getters['map/getDeviceByCode'](em.deviceCode) || null;
|
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 });
|
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
|
||||||
}
|
}
|
||||||
} else if (this.$route.query.ctc) {
|
} else if (this.$route.query.ctc) {
|
||||||
this.$store.dispatch('menuOperation/setSelected', {device: this.selected, subType: em.subType});
|
this.$store.dispatch('menuOperation/setSelected', {device: this.selected, subType: em.subType});
|
||||||
menu = getDeviceMenuByDeviceType(device._type);
|
menu = getDeviceMenuByDeviceType(device._type);
|
||||||
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
|
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
menu = getDeviceMenuByDeviceType('Cancel');
|
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');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
|
@ -1,285 +1,278 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="BigRouteInfo">
|
<div class="BigRouteInfo">
|
||||||
<el-form ref="form" :model="addModel" :rules="rules" label-width="140px" size="mini" class="bigDefinition">
|
<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-form-item v-if="isModify" label="编号:" prop="code">
|
||||||
<el-input v-model="addModel.code" style="width: 220px;" disabled />
|
<el-input v-model="addModel.code" style="width: 220px;" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="名称:" prop="name">
|
<el-form-item label="名称:" prop="name">
|
||||||
<el-input v-model="addModel.name" style="width: 220px;" />
|
<el-input v-model="addModel.name" style="width: 220px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联车站:" prop="stationCode">
|
<el-form-item label="关联车站:" prop="stationCode">
|
||||||
<el-select v-model="addModel.stationCode" clearable filterable>
|
<el-select v-model="addModel.stationCode" clearable filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stationList"
|
v-for="item in stationList"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="`${item.name}(${item.code})`"
|
:label="`${item.name}(${item.code})`"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button
|
<el-button
|
||||||
:type=" field === 'stationCode' ? 'danger' : 'primary'"
|
:type=" field === 'stationCode' ? 'danger' : 'primary'"
|
||||||
@click="hover('stationCode')"
|
@click="hover('stationCode')"
|
||||||
>{{ $t('map.activate') }}</el-button>
|
>{{ $t('map.activate') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="运行方向" prop="labelEnum">
|
<el-form-item label="运行方向" prop="labelEnum">
|
||||||
<el-select v-model="addModel.labelEnum">
|
<el-select v-model="addModel.labelEnum">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in directionLabelList"
|
v-for="item in directionLabelList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联区段:" prop="sectionList">
|
<el-form-item label="关联区段:" prop="sectionList">
|
||||||
<el-select v-model="addModel.sectionList" multiple :placeholder="$t('map.pleaseSelect')">
|
<el-select v-model="addModel.sectionList" multiple :placeholder="$t('map.pleaseSelect')">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in sectionList"
|
v-for="item in sectionList"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="`${item.name}(${item.code})`"
|
:label="`${item.name}(${item.code})`"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button
|
<el-button
|
||||||
:type=" field === 'sectionList' ? 'danger' : 'primary'"
|
:type=" field === 'sectionList' ? 'danger' : 'primary'"
|
||||||
@click="hover('sectionList')"
|
@click="hover('sectionList')"
|
||||||
>{{ $t('map.activate') }}</el-button>
|
>{{ $t('map.activate') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联信号机:" prop="signalCode">
|
<el-form-item label="关联信号机:" prop="signalCode">
|
||||||
<el-select v-model="addModel.signalCode" :placeholder="$t('map.pleaseSelect')">
|
<el-select v-model="addModel.signalCode" :placeholder="$t('map.pleaseSelect')">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in signalList"
|
v-for="item in signalList"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="`${item.name}(${item.code})`"
|
:label="`${item.name}(${item.code})`"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button :type="field === 'signalCode'? 'danger':'primary'" @click="hover('signalCode')">{{$t('map.activate')}}</el-button>
|
<el-button :type="field === 'signalCode'? 'danger':'primary'" @click="hover('signalCode')">{{ $t('map.activate') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="闭塞类型:" prop="runModel">
|
<el-form-item label="闭塞类型:" prop="runModel">
|
||||||
<el-select v-model="addModel.runModel" :placeholder="$t('map.pleaseSelect')">
|
<el-select v-model="addModel.runModel" :placeholder="$t('map.pleaseSelect')">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in runModelList"
|
v-for="item in runModelList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="默认状态:" prop="runStatus">
|
<el-form-item label="默认状态:" prop="runStatus">
|
||||||
<el-select v-model="addModel.runStatus" :placeholder="$t('map.pleaseSelect')">
|
<el-select v-model="addModel.runStatus" :placeholder="$t('map.pleaseSelect')">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in runStatusList"
|
v-for="item in runStatusList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="相对运行车站:" prop="relativeStationCode">
|
<el-form-item label="相对运行车站:" prop="relativeStationCode">
|
||||||
<el-select v-model="addModel.relativeStationCode" clearable filterable>
|
<el-select v-model="addModel.relativeStationCode" clearable filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stationList"
|
v-for="item in stationList"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="`${item.name}(${item.code})`"
|
:label="`${item.name}(${item.code})`"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button
|
<el-button
|
||||||
:type=" field === 'relativeStationCode' ? 'danger' : 'primary'"
|
:type=" field === 'relativeStationCode' ? 'danger' : 'primary'"
|
||||||
@click="hover('relativeStationCode')"
|
@click="hover('relativeStationCode')"
|
||||||
>{{ $t('map.activate') }}</el-button>
|
>{{ $t('map.activate') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="相对运行方向:" prop="relativeLabelEnum">
|
<el-form-item label="相对运行方向:" prop="relativeLabelEnum">
|
||||||
<el-select v-model="addModel.relativeLabelEnum">
|
<el-select v-model="addModel.relativeLabelEnum">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in directionLabelList"
|
v-for="item in directionLabelList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="bigDraft">
|
<div class="bigDraft">
|
||||||
<el-button-group class="bigDraftBtn">
|
<el-button-group class="bigDraftBtn">
|
||||||
<el-button v-if="isModify" type="warning" size="small" :loading="loading" @click="update ">更新</el-button>
|
<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 v-else type="primary" size="small" :loading="loading" @click="save">保存</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { setUID } from '@/jmapNew/utils/Uid';
|
// import { setUID } from '@/jmapNew/utils/Uid';
|
||||||
import { deepAssign } from '@/utils/index';
|
import { deepAssign } from '@/utils/index';
|
||||||
import { saveAssist } from '@/api/assist';
|
import { saveAssist } from '@/api/assist';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
import { queryAssistListPaged } from '@/api/assist';
|
import { queryAssistListPaged } from '@/api/assist';
|
||||||
export default {
|
export default {
|
||||||
name:'BigRouteInfo',
|
name:'BigRouteInfo',
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mapInfo: {
|
mapInfo: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
var checkSectionList = (rule, value, callback) => {
|
var checkSectionList = (rule, value, callback) => {
|
||||||
if (!value || value.length === 0){
|
if (!value || value.length === 0) {
|
||||||
callback(new Error('请选择关联区段!'));
|
callback(new Error('请选择关联区段!'));
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
field: '',
|
field: '',
|
||||||
loading: false,
|
loading: false,
|
||||||
isModify:false,
|
isModify:false,
|
||||||
mainDeviceList: [],
|
mainDeviceList: [],
|
||||||
directionLabelList: ConstConfig.ConstSelect.directionLabelList,
|
directionLabelList: ConstConfig.ConstSelect.directionLabelList,
|
||||||
addModel:{
|
addModel:{
|
||||||
id: '',
|
id: '',
|
||||||
name:'',
|
name:'',
|
||||||
stationCode: '',
|
stationCode: '',
|
||||||
labelEnum:'',
|
labelEnum:'',
|
||||||
sectionList: [],
|
sectionList: [],
|
||||||
signalCode: '',
|
signalCode: '',
|
||||||
runModel: '',
|
runModel: '',
|
||||||
runStatus: '',
|
runStatus: '',
|
||||||
relativeStationCode: '',
|
relativeStationCode: '',
|
||||||
relativeLabelEnum: ''
|
relativeLabelEnum: ''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
'name':[
|
'name':[
|
||||||
{ required: true, message: '请输入名称', trigger: 'blur' },
|
{ required: true, message: '请输入名称', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'stationCode':[
|
'stationCode':[
|
||||||
{ required: true, message: '请选择关联车站', trigger: 'blur' },
|
{ required: true, message: '请选择关联车站', trigger: 'blur' },
|
||||||
{ required: true, message: '请选择关联车站', trigger: 'change' },
|
{ required: true, message: '请选择关联车站', trigger: 'change' }
|
||||||
],
|
],
|
||||||
'labelEnum': [
|
'labelEnum': [
|
||||||
{ required: true, message: '请选择运行方向', trigger: 'change' }
|
{ required: true, message: '请选择运行方向', trigger: 'change' }
|
||||||
],
|
],
|
||||||
'signalCode': [
|
'signalCode': [
|
||||||
{ required: true, message: '请选择关联信号机', trigger: 'change' }
|
{ required: true, message: '请选择关联信号机', trigger: 'change' }
|
||||||
],
|
],
|
||||||
'sectionList': [
|
'sectionList': [
|
||||||
{ validator: checkSectionList, trigger: 'change' },
|
{ validator: checkSectionList, trigger: 'change' },
|
||||||
{ required: true, message: '请选择关联区段', trigger: 'blur' }
|
{ required: true, message: '请选择关联区段', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'runModel': [
|
'runModel': [
|
||||||
{ required: true, message: '请选择闭塞类型', trigger: 'change' }
|
{ required: true, message: '请选择闭塞类型', trigger: 'change' }
|
||||||
],
|
],
|
||||||
'runStatus': [
|
'runStatus': [
|
||||||
{ required: true, message: '请选择默认状态', trigger: 'change' }
|
{ required: true, message: '请选择默认状态', trigger: 'change' }
|
||||||
],
|
]
|
||||||
'relativeStationCode': [
|
},
|
||||||
{ required: true, message: '请选择相对运行车站', trigger: 'blur' },
|
runModelList: [
|
||||||
{ required: true, message: '请选择相对运行车站', trigger: 'change' }
|
{ label: '自动闭塞', value: 'A' },
|
||||||
],
|
{ label: '半自动闭塞', value: 'S' }
|
||||||
'relativeLabelEnum': [
|
],
|
||||||
{ required: true, message: '请选择相对运行方向', trigger: 'change' }
|
runStatusList: [
|
||||||
]
|
{ label: '接车口', value: 'R' },
|
||||||
},
|
{ label: '发车口', value: 'D' },
|
||||||
runModelList: [
|
{ label: '无状态', value: 'NO' }
|
||||||
{ label: '自动闭塞', value: 'A' },
|
],
|
||||||
{ label: '半自动闭塞', value: 'S' }
|
relativeList: []
|
||||||
],
|
};
|
||||||
runStatusList: [
|
},
|
||||||
{ label: '接车口', value: 'R' },
|
computed: {
|
||||||
{ label: '发车口', value: 'D' },
|
...mapGetters('map', [
|
||||||
{ label: '无状态', value: 'NO' }
|
'sectionList',
|
||||||
],
|
'stationList',
|
||||||
relativeList: []
|
'signalButtonList',
|
||||||
};
|
'signalList'
|
||||||
},
|
])
|
||||||
computed: {
|
},
|
||||||
...mapGetters('map', [
|
mounted() {
|
||||||
'sectionList',
|
this.initPage();
|
||||||
'stationList',
|
},
|
||||||
'signalButtonList',
|
methods:{
|
||||||
'signalList'
|
initPage() {
|
||||||
])
|
if (this.mapInfo) {
|
||||||
},
|
queryAssistListPaged({pageNum: 1, pageSize: 999}, this.mapInfo.id).then(resp => {
|
||||||
mounted() {
|
this.relativeList = resp.data.list;
|
||||||
this.initPage();
|
});
|
||||||
},
|
}
|
||||||
methods:{
|
},
|
||||||
initPage() {
|
hover(field) {
|
||||||
if (this.mapInfo) {
|
this.field = field === this.field ? '' : field;
|
||||||
queryAssistListPaged({pageNum: 1, pageSize: 999},this.mapInfo.id).then(resp => {
|
},
|
||||||
this.relativeList = resp.data.list;
|
changeRadio() {
|
||||||
});
|
this.$refs.form.clearValidate();
|
||||||
}
|
},
|
||||||
},
|
setSelected(selected) {
|
||||||
hover(field) {
|
if (selected) {
|
||||||
this.field = field === this.field ? '' : field;
|
if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'sectionList'.toUpperCase()) {
|
||||||
},
|
this.addModel.sectionList.push(selected.code);
|
||||||
changeRadio() {
|
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'stationCode'.toUpperCase()) {
|
||||||
this.$refs.form.clearValidate();
|
this.addModel.stationCode = selected.code;
|
||||||
},
|
this.field = '';
|
||||||
setSelected(selected) {
|
} else if (selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'signalCode'.toUpperCase()) {
|
||||||
if (selected) {
|
this.addModel.signalCode = selected.code;
|
||||||
if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'sectionList'.toUpperCase()) {
|
this.field = '';
|
||||||
this.addModel.sectionList.push(selected.code);
|
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'relativeStationCode'.toUpperCase()) {
|
||||||
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'stationCode'.toUpperCase()) {
|
this.addModel.relativeStationCode = selected.code;
|
||||||
this.addModel.stationCode = selected.code;
|
this.field = '';
|
||||||
this.field = '';
|
}
|
||||||
} else if (selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'signalCode'.toUpperCase()){
|
}
|
||||||
this.addModel.signalCode = selected.code;
|
},
|
||||||
this.field = '';
|
save() {
|
||||||
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'relativeStationCode'.toUpperCase()) {
|
const that = this;
|
||||||
this.addModel.relativeStationCode = selected.code;
|
that.$refs.form.validate((valid) => {
|
||||||
this.field = '';
|
if (valid) {
|
||||||
}
|
const newModel = deepAssign({}, that.addModel);
|
||||||
}
|
// newModel.code = setUID('Route');
|
||||||
},
|
that.loading = true;
|
||||||
save() {
|
saveAssist(newModel, that.mapInfo.id).then(res=>{
|
||||||
const that = this;
|
that.$message.success(that.$t('tip.creatingSuccessful'));
|
||||||
that.$refs.form.validate((valid) => {
|
that.loading = false;
|
||||||
if (valid) {
|
this.initPage();
|
||||||
const newModel = deepAssign({}, that.addModel);
|
that.clear();
|
||||||
// newModel.code = setUID('Route');
|
}).catch(() => {
|
||||||
that.loading = true;
|
that.$messageBox(that.$t('tip.operationAbnormal'));
|
||||||
saveAssist(newModel, that.mapInfo.id).then(res=>{
|
that.loading = false;
|
||||||
that.$message.success(that.$t('tip.creatingSuccessful'));
|
});
|
||||||
that.loading = false;
|
}
|
||||||
this.initPage();
|
});
|
||||||
that.clear();
|
},
|
||||||
}).catch(() => {
|
clear() {
|
||||||
that.$messageBox(that.$t('tip.operationAbnormal'));
|
if (this.$refs && this.$refs.form && this.mapInfo) {
|
||||||
that.loading = false;
|
this.$refs.form.resetFields();
|
||||||
});
|
this.addModel = {
|
||||||
}
|
id: '',
|
||||||
});
|
name:'',
|
||||||
},
|
stationCode: '',
|
||||||
clear() {
|
labelEnum:'',
|
||||||
if (this.$refs && this.$refs.form && this.mapInfo) {
|
sectionList: [],
|
||||||
this.$refs.form.resetFields();
|
signalCode: '',
|
||||||
this.addModel = {
|
runModel: '',
|
||||||
id: '',
|
runStatus: '',
|
||||||
name:'',
|
relativeCode: ''
|
||||||
stationCode: '',
|
};
|
||||||
labelEnum:'',
|
}
|
||||||
sectionList: [],
|
}
|
||||||
signalCode: '',
|
}
|
||||||
runModel: '',
|
};
|
||||||
runStatus: '',
|
|
||||||
relativeCode: ''
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.BigRouteInfo{
|
.BigRouteInfo{
|
||||||
|
@ -149,7 +149,8 @@ export default {
|
|||||||
'textList',
|
'textList',
|
||||||
'totalGuideLockButtonVOList',
|
'totalGuideLockButtonVOList',
|
||||||
'seclectDeviceList',
|
'seclectDeviceList',
|
||||||
'trainWindowList'
|
'trainWindowList',
|
||||||
|
'signalButtonList'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -283,7 +284,7 @@ export default {
|
|||||||
|
|
||||||
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
|
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
|
||||||
...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.indicatorLightList, ...this.lineList, ...this.outerFrameList,
|
...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)) {
|
if (!stationCodes.includes(item.stationCode)) {
|
||||||
this.addModel.elementList.push(item.code);
|
this.addModel.elementList.push(item.code);
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,8 @@ export default {
|
|||||||
'textList',
|
'textList',
|
||||||
'totalGuideLockButtonVOList',
|
'totalGuideLockButtonVOList',
|
||||||
'seclectDeviceList',
|
'seclectDeviceList',
|
||||||
'trainWindowList'
|
'trainWindowList',
|
||||||
|
'signalButtonList'
|
||||||
]),
|
]),
|
||||||
cardTitle() {
|
cardTitle() {
|
||||||
if (this.cardMode === 'generate') {
|
if (this.cardMode === 'generate') {
|
||||||
@ -407,7 +408,7 @@ export default {
|
|||||||
|
|
||||||
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
|
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
|
||||||
...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.indicatorLightList, ...this.lineList, ...this.outerFrameList,
|
...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));
|
const target = this.tableData.find(elem => elem.stationCodeList.includes(item.stationCode));
|
||||||
target && target.elementList.push(item.code);
|
target && target.elementList.push(item.code);
|
||||||
});
|
});
|
||||||
|
@ -204,7 +204,8 @@ export default {
|
|||||||
'textList',
|
'textList',
|
||||||
'totalGuideLockButtonVOList',
|
'totalGuideLockButtonVOList',
|
||||||
'seclectDeviceList',
|
'seclectDeviceList',
|
||||||
'trainWindowList'
|
'trainWindowList',
|
||||||
|
'signalButtonList'
|
||||||
]),
|
]),
|
||||||
cardTitle() {
|
cardTitle() {
|
||||||
if (this.cardMode === 'generate') {
|
if (this.cardMode === 'generate') {
|
||||||
@ -390,7 +391,7 @@ export default {
|
|||||||
});
|
});
|
||||||
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
|
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
|
||||||
...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.indicatorLightList, ...this.lineList, ...this.outerFrameList,
|
...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)) {
|
if (!stationCodeList.includes(item.stationCode)) {
|
||||||
tempData.elementList.push(item.code);
|
tempData.elementList.push(item.code);
|
||||||
}
|
}
|
||||||
@ -446,7 +447,7 @@ export default {
|
|||||||
|
|
||||||
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
|
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
|
||||||
...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.indicatorLightList, ...this.lineList, ...this.outerFrameList,
|
...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));
|
const target = this.tableData.find(elem => elem.stationCodeList.includes(item.stationCode));
|
||||||
target && target.elementList.push(item.code);
|
target && target.elementList.push(item.code);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user