Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
6ea1c7250d
@ -337,7 +337,7 @@ export function getSimulationContextListNew(group, conversationId) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取仿真会话消息列表(新版地图)
|
// 获取仿真会话成员列表(新版地图)
|
||||||
export function getSimulationChatMemberNew(group, conversationId) {
|
export function getSimulationChatMemberNew(group, conversationId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/simulation/${group}/${conversationId}/members`,
|
url: `/simulation/${group}/${conversationId}/members`,
|
||||||
@ -345,3 +345,19 @@ export function getSimulationChatMemberNew(group, conversationId) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 接受其他人的会话邀请 (新版地图)
|
||||||
|
export function acceptCoversitionInvite(group, conversationId) {
|
||||||
|
return request({
|
||||||
|
url: `/simulation/${group}/${conversationId}/accept`,
|
||||||
|
method: 'put'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 退出该群聊 (新版地图)
|
||||||
|
export function quitCoversition(group, conversationId) {
|
||||||
|
return request({
|
||||||
|
url: `/simulation/${group}/${conversationId}/exist`,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -81,14 +81,14 @@ export function getRaceUserList(params) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// /** 分页查询理论题列表 */
|
/** 裁判打分 */
|
||||||
// export function getCompetitionTheory(params) {
|
export function putRefereeScoring(data) {
|
||||||
// return request({
|
return request({
|
||||||
// url: `/api/v1/competitionTheory`,
|
url: `/api/v1/competition/referee/scoring`,
|
||||||
// method: 'get',
|
method: 'put',
|
||||||
// params
|
data
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
/** 提交试卷 */
|
/** 提交试卷 */
|
||||||
export function postCompetitionTheory(data) {
|
export function postCompetitionTheory(data) {
|
||||||
@ -146,3 +146,20 @@ export function getRaceById(id) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 退出当前赛场 */
|
||||||
|
export function quitCurrentRace(id, params) {
|
||||||
|
return request({
|
||||||
|
url: `/api/v1/competition/${id}/room`,
|
||||||
|
method: 'delete',
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查看加载的竞赛试题 */
|
||||||
|
export function getTestPaperDatail(competitionId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/v1/competition/${competitionId}/testPaper`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -510,6 +510,9 @@ export default {
|
|||||||
if ( typeof row.selectChange === 'function') {
|
if ( typeof row.selectChange === 'function') {
|
||||||
row.selectChange && row.selectChange(form);
|
row.selectChange && row.selectChange(form);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
getFormModel() {
|
||||||
|
return this.formModel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -486,6 +486,13 @@ export default {
|
|||||||
}
|
}
|
||||||
this.queryList.data = [...this.queryList.data];
|
this.queryList.data = [...this.queryList.data];
|
||||||
},
|
},
|
||||||
|
getFormModel() {
|
||||||
|
if (this.$refs.queryForm) {
|
||||||
|
return this.$refs.queryForm.getFormModel();
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
sortChange(data) {
|
sortChange(data) {
|
||||||
const self = this;
|
const self = this;
|
||||||
if (data.order && data.column.sortable == 'custom') {
|
if (data.order && data.column.sortable == 'custom') {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -303,7 +303,7 @@ export default class Switch extends Group {
|
|||||||
this.releaseBackground.hide();
|
this.releaseBackground.hide();
|
||||||
break;
|
break;
|
||||||
case '02':
|
case '02':
|
||||||
this.relocShelter.getSection().animateStyle(true)
|
this.relocShelter && this.relocShelter.getSection().animateStyle(true)
|
||||||
.when(1000, { fill: this.style.backgroundColor })
|
.when(1000, { fill: this.style.backgroundColor })
|
||||||
.start();
|
.start();
|
||||||
break;
|
break;
|
||||||
|
@ -250,6 +250,13 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 供电线路
|
||||||
|
this[deviceType.Power] = {
|
||||||
|
lineColor: '#FFFFFF', // 线条颜色
|
||||||
|
strokeColor: '#ccc', // 线条颜色
|
||||||
|
extendLength: 10 // 延伸长度
|
||||||
|
};
|
||||||
|
|
||||||
this[deviceType.StationStand] = {
|
this[deviceType.StationStand] = {
|
||||||
common: { // 通用属性
|
common: { // 通用属性
|
||||||
textFontSize: 8, // 站台默认字体大小
|
textFontSize: 8, // 站台默认字体大小
|
||||||
@ -409,7 +416,8 @@ class SkinCode extends defaultStyle {
|
|||||||
inversionColor: '#9C9D09', // 道岔反位颜色
|
inversionColor: '#9C9D09', // 道岔反位颜色
|
||||||
monolockLocationColor: '#870E10', // 道岔单锁'定位'颜色
|
monolockLocationColor: '#870E10', // 道岔单锁'定位'颜色
|
||||||
monolockInversionColor: '#870E10', // 道岔单锁'反位'颜色
|
monolockInversionColor: '#870E10', // 道岔单锁'反位'颜色
|
||||||
block: true // 封锁名称
|
block: true, // 封锁名称
|
||||||
|
faultFlashing: true // 故障闪烁
|
||||||
},
|
},
|
||||||
sectionAction: {
|
sectionAction: {
|
||||||
flag: false, // 道岔 关联区段显示
|
flag: false, // 道岔 关联区段显示
|
||||||
|
@ -363,6 +363,13 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 供电线路
|
||||||
|
this[deviceType.Power] = {
|
||||||
|
lineColor: '#FFFFFF', // 线条颜色
|
||||||
|
strokeColor: '#ccc', // 线条颜色
|
||||||
|
extendLength: 10 // 延伸长度
|
||||||
|
};
|
||||||
|
|
||||||
this[deviceType.Switch] = {
|
this[deviceType.Switch] = {
|
||||||
text: {
|
text: {
|
||||||
show: true, // 道岔名称显示
|
show: true, // 道岔名称显示
|
||||||
@ -376,7 +383,8 @@ class SkinCode extends defaultStyle {
|
|||||||
locateColor: 'lightgreen', // 道岔定位颜色
|
locateColor: 'lightgreen', // 道岔定位颜色
|
||||||
inversionColor: 'lightgreen', // 道岔反位颜色
|
inversionColor: 'lightgreen', // 道岔反位颜色
|
||||||
monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
||||||
monolockInversionColor: '#FFFF00' // 道岔单锁'反位'颜色 (黄色)
|
monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
|
||||||
|
faultFlashing: true // 故障闪烁
|
||||||
},
|
},
|
||||||
sectionAction: {
|
sectionAction: {
|
||||||
flag: false, // 道岔 关联区段显示
|
flag: false, // 道岔 关联区段显示
|
||||||
|
@ -200,6 +200,13 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 供电线路
|
||||||
|
this[deviceType.Power] = {
|
||||||
|
lineColor: '#FFFFFF', // 线条颜色
|
||||||
|
strokeColor: '#ccc', // 线条颜色
|
||||||
|
extendLength: 10 // 延伸长度
|
||||||
|
};
|
||||||
|
|
||||||
this[deviceType.StationStand] = {
|
this[deviceType.StationStand] = {
|
||||||
common: { // 通用属性
|
common: { // 通用属性
|
||||||
textFontSize: 10, // 站台默认字体大小
|
textFontSize: 10, // 站台默认字体大小
|
||||||
@ -359,7 +366,8 @@ class SkinCode extends defaultStyle {
|
|||||||
locateColor: '#00FF00', // 道岔定位颜色
|
locateColor: '#00FF00', // 道岔定位颜色
|
||||||
inversionColor: '#FFFF00', // 道岔反位颜色
|
inversionColor: '#FFFF00', // 道岔反位颜色
|
||||||
monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
||||||
monolockInversionColor: '#FFFF00' // 道岔单锁'反位'颜色 (黄色)
|
monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
|
||||||
|
faultFlashing: true // 故障闪烁
|
||||||
},
|
},
|
||||||
sectionAction: {
|
sectionAction: {
|
||||||
flag: false, // 道岔 关联区段显示
|
flag: false, // 道岔 关联区段显示
|
||||||
|
@ -383,6 +383,13 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 供电线路
|
||||||
|
this[deviceType.Power] = {
|
||||||
|
lineColor: '#FFFFFF', // 线条颜色
|
||||||
|
strokeColor: '#ccc', // 线条颜色
|
||||||
|
extendLength: 10 // 延伸长度
|
||||||
|
};
|
||||||
|
|
||||||
this[deviceType.Switch] = {
|
this[deviceType.Switch] = {
|
||||||
text: {
|
text: {
|
||||||
show: true, // 道岔名称显示
|
show: true, // 道岔名称显示
|
||||||
@ -397,7 +404,8 @@ class SkinCode extends defaultStyle {
|
|||||||
inversionColor: '#FFFF00', // 道岔反位颜色
|
inversionColor: '#FFFF00', // 道岔反位颜色
|
||||||
monolockLocationColor: '#c00000', // 道岔单锁'定位'颜色 (红色)
|
monolockLocationColor: '#c00000', // 道岔单锁'定位'颜色 (红色)
|
||||||
monolockInversionColor: '#c00000', // 道岔单锁'反位'颜色 (红色)
|
monolockInversionColor: '#c00000', // 道岔单锁'反位'颜色 (红色)
|
||||||
block: true // 封锁名称
|
block: true, // 封锁名称
|
||||||
|
faultFlashing: true // 故障闪烁
|
||||||
},
|
},
|
||||||
sectionAction: {
|
sectionAction: {
|
||||||
flag: false, // 道岔 关联区段显示
|
flag: false, // 道岔 关联区段显示
|
||||||
|
@ -329,8 +329,8 @@ class SkinCode extends defaultStyle {
|
|||||||
},
|
},
|
||||||
StationControl:{
|
StationControl:{
|
||||||
text: {
|
text: {
|
||||||
distance: 2, // 灯和文字之间的距离
|
distance: 10, // 灯和文字之间的距离
|
||||||
fontSize: 11, // 字体大小
|
fontSize: 14, // 字体大小
|
||||||
fontFormat: 'consolas', // 字体格式
|
fontFormat: 'consolas', // 字体格式
|
||||||
fontColor: '#ffffff', // 字体颜色
|
fontColor: '#ffffff', // 字体颜色
|
||||||
fontWeight: 'normal', // 字体粗细
|
fontWeight: 'normal', // 字体粗细
|
||||||
@ -345,9 +345,9 @@ class SkinCode extends defaultStyle {
|
|||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
count: 2, // 控制模式灯个数
|
count: 2, // 控制模式灯个数
|
||||||
offset: {x: 0, y: 0}, // 控制模式灯偏移量
|
offset: {x: 0, y: 3}, // 控制模式灯偏移量
|
||||||
radiusR: 4, // 控制模式灯的半径
|
radiusR: 7, // 控制模式灯的半径
|
||||||
distance: 36, // 控制模式之间灯之间的距离
|
distance: 42, // 控制模式之间灯之间的距离
|
||||||
grayColor: '#7F7F7F', // 控制模式灰色
|
grayColor: '#7F7F7F', // 控制模式灰色
|
||||||
greenColor: '#00FF00', // 控制模式绿色
|
greenColor: '#00FF00', // 控制模式绿色
|
||||||
redColor: '#FF0000', // 控制模式红色
|
redColor: '#FF0000', // 控制模式红色
|
||||||
@ -386,7 +386,8 @@ class SkinCode extends defaultStyle {
|
|||||||
inversionColor: '#9C9D09', // 道岔反位颜色
|
inversionColor: '#9C9D09', // 道岔反位颜色
|
||||||
monolockLocationColor: '#ea282c', // 道岔单锁'定位'颜色
|
monolockLocationColor: '#ea282c', // 道岔单锁'定位'颜色
|
||||||
monolockInversionColor: '#ea282c', // 道岔单锁'反位'颜色
|
monolockInversionColor: '#ea282c', // 道岔单锁'反位'颜色
|
||||||
block: true // 封锁名称
|
block: true, // 封锁名称
|
||||||
|
faultFlashing: true // 故障闪烁
|
||||||
},
|
},
|
||||||
sectionAction: {
|
sectionAction: {
|
||||||
flag: false, // 道岔 关联区段显示
|
flag: false, // 道岔 关联区段显示
|
||||||
@ -418,6 +419,12 @@ class SkinCode extends defaultStyle {
|
|||||||
this[deviceType.Line] = {
|
this[deviceType.Line] = {
|
||||||
lineColor: '#FFFFFF' // 线条颜色
|
lineColor: '#FFFFFF' // 线条颜色
|
||||||
};
|
};
|
||||||
|
// 供电线路
|
||||||
|
this[deviceType.Power] = {
|
||||||
|
lineColor: '#FFFFFF', // 线条颜色
|
||||||
|
strokeColor: '#ccc', // 线条颜色
|
||||||
|
extendLength: 8 // 延伸长度
|
||||||
|
};
|
||||||
|
|
||||||
this[deviceType.LcControl] = {
|
this[deviceType.LcControl] = {
|
||||||
text: {
|
text: {
|
||||||
|
@ -392,6 +392,13 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 供电线路
|
||||||
|
this[deviceType.Power] = {
|
||||||
|
lineColor: '#FFFFFF', // 线条颜色
|
||||||
|
strokeColor: '#ccc', // 线条颜色
|
||||||
|
extendLength: 10 // 延伸长度
|
||||||
|
};
|
||||||
|
|
||||||
this[deviceType.Switch] = {
|
this[deviceType.Switch] = {
|
||||||
text: {
|
text: {
|
||||||
show: true, // 道岔名称显示
|
show: true, // 道岔名称显示
|
||||||
@ -406,7 +413,8 @@ class SkinCode extends defaultStyle {
|
|||||||
inversionColor: '#fff', // 道岔反位颜色
|
inversionColor: '#fff', // 道岔反位颜色
|
||||||
monolock: true, // 名称单锁显示包围框
|
monolock: true, // 名称单锁显示包围框
|
||||||
monolockLocationColor: '#fff', // 道岔单锁'定位'颜色
|
monolockLocationColor: '#fff', // 道岔单锁'定位'颜色
|
||||||
monolockInversionColor: '#fff' // 道岔单锁'反位'颜色
|
monolockInversionColor: '#fff', // 道岔单锁'反位'颜色
|
||||||
|
faultFlashing: true // 故障闪烁
|
||||||
},
|
},
|
||||||
sectionAction: {
|
sectionAction: {
|
||||||
flag: true, // 道岔 关联区段显示
|
flag: true, // 道岔 关联区段显示
|
||||||
|
@ -269,7 +269,8 @@ class SkinCode extends defaultStyle {
|
|||||||
inversionColor: '#FFFF00', // 道岔反位颜色
|
inversionColor: '#FFFF00', // 道岔反位颜色
|
||||||
monolockLocationColor: 'lightgreen', // 道岔单锁'定位'颜色 (浅绿色)
|
monolockLocationColor: 'lightgreen', // 道岔单锁'定位'颜色 (浅绿色)
|
||||||
monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
|
monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
|
||||||
block: true // 封锁名称
|
block: true, // 封锁名称
|
||||||
|
faultFlashing: true // 故障闪烁
|
||||||
},
|
},
|
||||||
sectionAction: {
|
sectionAction: {
|
||||||
flag: false, // 道岔 关联区段显示
|
flag: false, // 道岔 关联区段显示
|
||||||
@ -411,6 +412,13 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 供电线路
|
||||||
|
this[deviceType.Power] = {
|
||||||
|
lineColor: '#FFFFFF', // 线条颜色
|
||||||
|
strokeColor: '#ccc', // 线条颜色
|
||||||
|
extendLength: 10 // 延伸长度
|
||||||
|
};
|
||||||
|
|
||||||
this[deviceType.StationDelayUnlock] = {
|
this[deviceType.StationDelayUnlock] = {
|
||||||
text: {
|
text: {
|
||||||
distance: 3, // 延迟解锁和设备之间的距离
|
distance: 3, // 延迟解锁和设备之间的距离
|
||||||
|
@ -387,6 +387,13 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 供电线路
|
||||||
|
this[deviceType.Power] = {
|
||||||
|
lineColor: '#FFFFFF', // 线条颜色
|
||||||
|
strokeColor: '#ccc', // 线条颜色
|
||||||
|
extendLength: 10 // 延伸长度
|
||||||
|
};
|
||||||
|
|
||||||
this[deviceType.Switch] = {
|
this[deviceType.Switch] = {
|
||||||
text: {
|
text: {
|
||||||
show: true, // 道岔名称显示
|
show: true, // 道岔名称显示
|
||||||
@ -401,7 +408,9 @@ class SkinCode extends defaultStyle {
|
|||||||
inversionColor: '#9C9D09', // 道岔反位颜色
|
inversionColor: '#9C9D09', // 道岔反位颜色
|
||||||
monolockLocationColor: '#ea282c', // 道岔单锁'定位'颜色
|
monolockLocationColor: '#ea282c', // 道岔单锁'定位'颜色
|
||||||
monolockInversionColor: '#ea282c', // 道岔单锁'反位'颜色
|
monolockInversionColor: '#ea282c', // 道岔单锁'反位'颜色
|
||||||
block: true // 封锁名称
|
block: true, // 封锁名称
|
||||||
|
faultFlashing: false, // 故障闪烁
|
||||||
|
lossRect: true // 道岔失表矩形
|
||||||
},
|
},
|
||||||
sectionAction: {
|
sectionAction: {
|
||||||
flag: false, // 道岔 关联区段显示
|
flag: false, // 道岔 关联区段显示
|
||||||
@ -459,7 +468,7 @@ class SkinCode extends defaultStyle {
|
|||||||
this[deviceType.SwitchFault] = {
|
this[deviceType.SwitchFault] = {
|
||||||
displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||||
text: {
|
text: {
|
||||||
fontSize: 11, // 字体大小
|
fontSize: 14, // 字体大小
|
||||||
fontWeight: 'normal', // 字体粗细
|
fontWeight: 'normal', // 字体粗细
|
||||||
distance: 5 // 灯跟文字距离
|
distance: 5 // 灯跟文字距离
|
||||||
},
|
},
|
||||||
@ -596,7 +605,7 @@ class SkinCode extends defaultStyle {
|
|||||||
defaultDirectionCode: 'D', // 默认车次号1
|
defaultDirectionCode: 'D', // 默认车次号1
|
||||||
defaultTripNumber: 'CCC', // 默认车次号2
|
defaultTripNumber: 'CCC', // 默认车次号2
|
||||||
trainTargetOffset: { x: 42, y: 1}, // 列车车次号偏移
|
trainTargetOffset: { x: 42, y: 1}, // 列车车次号偏移
|
||||||
smallColor: '#70ECEE', // 小交路颜色
|
smallColor: '#00FFFF', // 小交路颜色
|
||||||
bigColor: '#FFFFFF', // 大交路颜色
|
bigColor: '#FFFFFF', // 大交路颜色
|
||||||
inboundColor: '#00FF00', // 回库颜色
|
inboundColor: '#00FF00', // 回库颜色
|
||||||
planTypeColor: '#FFFFFF' // 计划车颜色
|
planTypeColor: '#FFFFFF' // 计划车颜色
|
||||||
|
@ -436,7 +436,8 @@ class SkinCode extends defaultStyle {
|
|||||||
locateColor: '#FFFFFF', // 道岔定位颜色
|
locateColor: '#FFFFFF', // 道岔定位颜色
|
||||||
inversionColor: '#FFFFFF', // 道岔反位颜色
|
inversionColor: '#FFFFFF', // 道岔反位颜色
|
||||||
monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
||||||
monolockInversionColor: '#FFFF00' // 道岔单锁'反位'颜色 (黄色)
|
monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
|
||||||
|
faultFlashing: true // 故障闪烁
|
||||||
},
|
},
|
||||||
sectionAction: {
|
sectionAction: {
|
||||||
flag: false, // 道岔 关联区段显示
|
flag: false, // 道岔 关联区段显示
|
||||||
@ -509,6 +510,14 @@ class SkinCode extends defaultStyle {
|
|||||||
lineColor: '#FFFFFF', // 线条颜色
|
lineColor: '#FFFFFF', // 线条颜色
|
||||||
lineDash: [8, 4]
|
lineDash: [8, 4]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 供电线路
|
||||||
|
this[deviceType.Power] = {
|
||||||
|
lineColor: '#FFFFFF', // 线条颜色
|
||||||
|
strokeColor: '#ccc', // 线条颜色
|
||||||
|
extendLength: 10 // 延伸长度
|
||||||
|
};
|
||||||
|
|
||||||
this[deviceType.AutomaticRoute] = {
|
this[deviceType.AutomaticRoute] = {
|
||||||
// 是否显示
|
// 是否显示
|
||||||
displayCondition: '03', // 显示条件 prdType
|
displayCondition: '03', // 显示条件 prdType
|
||||||
|
@ -245,4 +245,9 @@ deviceRender[deviceType.Arrow] = {
|
|||||||
_type: deviceType.Arrow,
|
_type: deviceType.Arrow,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
};
|
};
|
||||||
|
/** 供电线路 */
|
||||||
|
deviceRender[deviceType.Power] = {
|
||||||
|
_type: deviceType.Power,
|
||||||
|
zlevel: 1
|
||||||
|
};
|
||||||
export default deviceRender;
|
export default deviceRender;
|
||||||
|
@ -42,7 +42,8 @@ const deviceType = {
|
|||||||
Axle: 'Axle',
|
Axle: 'Axle',
|
||||||
SplitStation:'SplitStation',
|
SplitStation:'SplitStation',
|
||||||
SwitchFault: 'SwitchFault',
|
SwitchFault: 'SwitchFault',
|
||||||
Arrow: 'Arrow'
|
Arrow: 'Arrow',
|
||||||
|
Power: 'Power'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default deviceType;
|
export default deviceType;
|
||||||
|
@ -378,7 +378,7 @@ class Jlmap {
|
|||||||
update(list) {
|
update(list) {
|
||||||
this.setUpdateMapDevice(list || []); // 增加一个 前数据 处理 为了在区段中 获取全部的 道岔信息
|
this.setUpdateMapDevice(list || []); // 增加一个 前数据 处理 为了在区段中 获取全部的 道岔信息
|
||||||
const signalDeviceList = [];
|
const signalDeviceList = [];
|
||||||
(list || []).forEach(elem => {
|
(list || []).forEach((elem, index) => {
|
||||||
const code = elem.code;
|
const code = elem.code;
|
||||||
const type = elem._type;
|
const type = elem._type;
|
||||||
if (elem.deviceType === 'ROUTE') { // 处理进路数据状态
|
if (elem.deviceType === 'ROUTE') { // 处理进路数据状态
|
||||||
@ -419,7 +419,9 @@ class Jlmap {
|
|||||||
} else {
|
} else {
|
||||||
if (elem.deviceType === 'TRAIN') {
|
if (elem.deviceType === 'TRAIN') {
|
||||||
store.dispatch('map/updateTrainState', elem);
|
store.dispatch('map/updateTrainState', elem);
|
||||||
store.dispatch('map/setTrainListUpdate', elem);
|
if (index >= list.length - 1) {
|
||||||
|
store.dispatch('map/setTrainListUpdate');
|
||||||
|
}
|
||||||
} else if (elem.deviceType === 'STAND') {
|
} else if (elem.deviceType === 'STAND') {
|
||||||
store.dispatch('map/updateStationStand', elem);
|
store.dispatch('map/updateStationStand', elem);
|
||||||
}
|
}
|
||||||
|
47
src/jmapNew/shape/Power/ESeparator.js
Normal file
47
src/jmapNew/shape/Power/ESeparator.js
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import Polyline from 'zrender/src/graphic/shape/Polyline';
|
||||||
|
|
||||||
|
/** 分隔符*/
|
||||||
|
export default class ESeparator extends Group {
|
||||||
|
constructor(model) {
|
||||||
|
super();
|
||||||
|
this.model = model;
|
||||||
|
this.zlevel = model.zlevel;
|
||||||
|
this.z = model.z || 6;
|
||||||
|
this.style = model.style;
|
||||||
|
this.setType();
|
||||||
|
}
|
||||||
|
|
||||||
|
createModel(points) {
|
||||||
|
const model = this.model;
|
||||||
|
this.partition = new Polyline({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
progressive: model.progressive,
|
||||||
|
z: this.z,
|
||||||
|
shape: {
|
||||||
|
points: points
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: model.width,
|
||||||
|
stroke: model.stroke
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.partition);
|
||||||
|
}
|
||||||
|
|
||||||
|
setType() {
|
||||||
|
const model = this.model;
|
||||||
|
if (model && model.traingle) {
|
||||||
|
const points = [
|
||||||
|
[model.point.x, model.point.y - (this.style.Power.extendLength)],
|
||||||
|
[model.point.x, model.point.y + (this.style.Power.extendLength)]
|
||||||
|
];
|
||||||
|
this.createModel(points);
|
||||||
|
}
|
||||||
|
if (model.traingle) {
|
||||||
|
this.origin = [model.point.x, model.point.y];
|
||||||
|
this.rotation = Math.PI * 2 - Math.atan2(model.traingle.absy, model.traingle.absx) * model.traingle.drictx * model.traingle.dricty;
|
||||||
|
this.dirty(); // 可以无需调用
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
131
src/jmapNew/shape/Power/index.js
Normal file
131
src/jmapNew/shape/Power/index.js
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
import Polyline from 'zrender/src/graphic/shape/Polyline';
|
||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import JTriangle from '../../utils/JTriangle';
|
||||||
|
import ESeparator from './ESeparator';
|
||||||
|
import {isShowThePrdType} from '../../utils/handlePath';
|
||||||
|
|
||||||
|
export default class Line2 extends Group {
|
||||||
|
constructor(model, style) {
|
||||||
|
super();
|
||||||
|
this._code = model.code;
|
||||||
|
this._type = model._type;
|
||||||
|
this.zlevel = model.zlevel;
|
||||||
|
this.z = 0;
|
||||||
|
this.model = model;
|
||||||
|
this.style = style;
|
||||||
|
this.isShowShape = true;
|
||||||
|
if (isShowThePrdType(model.prdType, model.showConditions) || model.previewOrMapDraw) {
|
||||||
|
this.create();
|
||||||
|
this.createTerminal();
|
||||||
|
this.setState(model);
|
||||||
|
}
|
||||||
|
if (model.previewOrMapDraw) {
|
||||||
|
this.setShowMode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
create() {
|
||||||
|
const model = this.model;
|
||||||
|
const style = this.style;
|
||||||
|
if (model && model.points.length > 1) {
|
||||||
|
const points = [];
|
||||||
|
for (let i = 0; i < model.points.length; i++) {
|
||||||
|
points.push([model.points[i].x, model.points[i].y]);
|
||||||
|
}
|
||||||
|
this.line = new Polyline({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
progressive: model.progressive,
|
||||||
|
z: this.z,
|
||||||
|
shape: {
|
||||||
|
points: points
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: model.width,
|
||||||
|
stroke: style.Power.strokeColor
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
createTerminal() { // 创建左右端点
|
||||||
|
const model = this.model;
|
||||||
|
const style = this.style;
|
||||||
|
if (model && model.leftTerminal) { // 左端点
|
||||||
|
const traingle = new JTriangle(model.points[0], model.points[1]);
|
||||||
|
this.leftTerminal = new ESeparator({
|
||||||
|
style: style,
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z + 3,
|
||||||
|
traingle: traingle,
|
||||||
|
width: model.width,
|
||||||
|
stroke: style.Power.strokeColor,
|
||||||
|
point: {
|
||||||
|
x: model.points[0].x,
|
||||||
|
y: model.points[0].y
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.leftTerminal);
|
||||||
|
}
|
||||||
|
if (model && model.rightTerminal) { // 右端点
|
||||||
|
const traingle = new JTriangle(model.points[model.points.length - 2], model.points[model.points.length - 1]);
|
||||||
|
this.rightTerminal = new ESeparator({
|
||||||
|
style: style,
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z + 3,
|
||||||
|
traingle: traingle,
|
||||||
|
width: model.width,
|
||||||
|
stroke: style.Power.strokeColor,
|
||||||
|
point: {
|
||||||
|
x: model.points[model.points.length - 1].x,
|
||||||
|
y: model.points[model.points.length - 1].y
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.rightTerminal);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setLineType(type) {
|
||||||
|
switch (type) {
|
||||||
|
case '01': break;
|
||||||
|
case '02':
|
||||||
|
this.eachChild((child) => {
|
||||||
|
child.setStyle('lineDash', this.style.Line.lineDash || [4]);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setState(model) {
|
||||||
|
if (!this.isShowShape) return;
|
||||||
|
this.setLineType(model.type);
|
||||||
|
}
|
||||||
|
// 设置显示模式
|
||||||
|
setShowMode() {
|
||||||
|
const showMode = this.model.showMode;
|
||||||
|
const showConditions = this.model.showConditions;
|
||||||
|
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
||||||
|
this.eachChild((child) => {
|
||||||
|
child.show();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.eachChild((child) => {
|
||||||
|
child.hide();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setShowStation(stationCode) {
|
||||||
|
if (!stationCode || this.model.stationCode === stationCode) {
|
||||||
|
this.eachChild((child) => {
|
||||||
|
child.show();
|
||||||
|
});
|
||||||
|
this.isShowShape = true;
|
||||||
|
this.setState(this.model);
|
||||||
|
} else {
|
||||||
|
this.eachChild((child) => {
|
||||||
|
child.hide();
|
||||||
|
});
|
||||||
|
this.isShowShape = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -224,4 +224,7 @@ export default class SaidLamp extends Group {
|
|||||||
this.isShowShape = false;
|
this.isShowShape = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setControlColor(color) {
|
||||||
|
this.control && this.control.setControlColor(color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,12 @@ export default class ESingleControl extends Group {
|
|||||||
this.control.setStyle('fill', color);
|
this.control.setStyle('fill', color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setTextColor(color) {
|
||||||
|
if (color) {
|
||||||
|
this.text.setStyle('textFill', color);
|
||||||
|
}
|
||||||
|
}
|
||||||
getArcBoundingRect() {
|
getArcBoundingRect() {
|
||||||
const rect = this.control.getBoundingRect().clone();
|
const rect = this.control.getBoundingRect().clone();
|
||||||
const scale = this.control.scale[0];
|
const scale = this.control.scale[0];
|
||||||
|
@ -291,12 +291,15 @@ export default class Station extends Group {
|
|||||||
this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor);
|
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor);
|
||||||
|
this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.lamp.greenColor); // 文字颜色
|
||||||
}
|
}
|
||||||
|
|
||||||
handleLocal() { // 站控
|
handleLocal() { // 站控
|
||||||
this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor);
|
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor);
|
||||||
|
this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.lamp.yellowColor); // 文字颜色
|
||||||
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
|
this.arrowsControl && this.arrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleEmergency() { // 紧急站控
|
handleEmergency() { // 紧急站控
|
||||||
|
@ -47,6 +47,10 @@ class ESwLnversion extends Group {
|
|||||||
this.relocShelter.stopAnimation(flag);
|
this.relocShelter.stopAnimation(flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getSection() {
|
||||||
|
return this.relocShelter;
|
||||||
|
}
|
||||||
|
|
||||||
animateStyle(cb) {
|
animateStyle(cb) {
|
||||||
this.eachChild((child) => {
|
this.eachChild((child) => {
|
||||||
cb(child);
|
cb(child);
|
||||||
|
@ -50,6 +50,9 @@ class ESwLocal extends Group {
|
|||||||
cb(child);
|
cb(child);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
getLocal() {
|
||||||
|
return this.locShelter;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ESwLocal;
|
export default ESwLocal;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import Line from 'zrender/src/graphic/shape/Line';
|
import Line from 'zrender/src/graphic/shape/Line';
|
||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group';
|
||||||
import Text from 'zrender/src/graphic/Text';
|
import Text from 'zrender/src/graphic/Text';
|
||||||
|
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||||
import JTriangle from '../../utils/JTriangle';
|
import JTriangle from '../../utils/JTriangle';
|
||||||
import ESwName from './ESwName.js';
|
import ESwName from './ESwName.js';
|
||||||
import ESwLocal from './ESwLocal.js';
|
import ESwLocal from './ESwLocal.js';
|
||||||
@ -105,7 +106,27 @@ export default class Switch extends Group {
|
|||||||
onmouseover: () => { this.name.getArrowText().show(); },
|
onmouseover: () => { this.name.getArrowText().show(); },
|
||||||
onmouseout: () => { this.name.getArrowText().hide(); }
|
onmouseout: () => { this.name.getArrowText().hide(); }
|
||||||
});
|
});
|
||||||
|
if (this.style.Switch.text.lossRect) {
|
||||||
|
const lossRect = this.locShelter.getLocal().getBoundingRect();
|
||||||
|
this.lossShow = new Rect({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z + 1,
|
||||||
|
shape: {
|
||||||
|
x: lossRect.x - 5,
|
||||||
|
y: lossRect.y - 5,
|
||||||
|
width: lossRect.width + 10,
|
||||||
|
height: lossRect.height + 10
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
fill: 'rgba(0, 0, 0, 1)',
|
||||||
|
lineDash: [3, 3],
|
||||||
|
stroke: '#F00',
|
||||||
|
lineWidth: 2
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.lossShow);
|
||||||
|
this.lossShow.hide();
|
||||||
|
}
|
||||||
const trapezoidWidth = this.style.Switch.jointImg.trapezoidLength;
|
const trapezoidWidth = this.style.Switch.jointImg.trapezoidLength;
|
||||||
const Tspoint1 = [model.intersection.x + directx * width3 + directx * (width2 + width1) - directx * width3, model.intersection.y + directy * switchWidth1];
|
const Tspoint1 = [model.intersection.x + directx * width3 + directx * (width2 + width1) - directx * width3, model.intersection.y + directy * switchWidth1];
|
||||||
const Tspoint2 = [Tspoint1[0] - directx * trapezoidWidth, Tspoint1[1]];
|
const Tspoint2 = [Tspoint1[0] - directx * trapezoidWidth, Tspoint1[1]];
|
||||||
@ -268,6 +289,8 @@ export default class Switch extends Group {
|
|||||||
this.locShelter.hide(); // 定位覆盖图形
|
this.locShelter.hide(); // 定位覆盖图形
|
||||||
this.relocShelter.hide(); // 反位覆盖图形
|
this.relocShelter.hide(); // 反位覆盖图形
|
||||||
this.enabledName.hide(); // 使能隐藏
|
this.enabledName.hide(); // 使能隐藏
|
||||||
|
this.lossShow && this.lossShow.hide();
|
||||||
|
this.lossShow && this.lossShow.stopAnimation(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 定位*/
|
/** 定位*/
|
||||||
@ -298,7 +321,7 @@ export default class Switch extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 失去*/
|
/** 失去*/
|
||||||
setLossAction(nameFlicker) {
|
setLossAction() {
|
||||||
// this.recover();
|
// this.recover();
|
||||||
this.locShelter.show();
|
this.locShelter.show();
|
||||||
this.relocShelter.show();
|
this.relocShelter.show();
|
||||||
@ -306,9 +329,24 @@ export default class Switch extends Group {
|
|||||||
this.sheltertriangle.show();
|
this.sheltertriangle.show();
|
||||||
this.sheltertriangle.setColor(this.style.backgroundColor);
|
this.sheltertriangle.setColor(this.style.backgroundColor);
|
||||||
this.setTextColor(this.style.Switch.text.lossColor);
|
this.setTextColor(this.style.Switch.text.lossColor);
|
||||||
nameFlicker && this.nameTextAnimation();
|
this.style.Switch.text.faultFlashing && this.nameTextAnimation();
|
||||||
}
|
this.lossShow && this.lossShow.show();
|
||||||
|
this.lossShow && this.lossShow.animateStyle(true)
|
||||||
|
.when(0, { stroke: this.style.backgroundColor })
|
||||||
|
.when(500, { stroke: '#F00' })
|
||||||
|
.when(1000, { stroke: this.style.backgroundColor })
|
||||||
|
.start();
|
||||||
|
|
||||||
|
}
|
||||||
|
setSwitchFault(split) {
|
||||||
|
if (this.model.switchFaultCode && split) {
|
||||||
|
const switchFault = store.getters['map/getDeviceByCode'](this.model.switchFaultCode);
|
||||||
|
switchFault.instance.setControlColor('#F00');
|
||||||
|
} else if (this.model.switchFaultCode && !split) {
|
||||||
|
const switchFault = store.getters['map/getDeviceByCode'](this.model.switchFaultCode);
|
||||||
|
switchFault.instance.setControlColor(this.style.backgroundColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
/** 挤叉*/
|
/** 挤叉*/
|
||||||
setForkAction() {
|
setForkAction() {
|
||||||
this.rhomboid.hide(); // 平行四边形
|
this.rhomboid.hide(); // 平行四边形
|
||||||
@ -424,10 +462,10 @@ export default class Switch extends Group {
|
|||||||
if (this.model.normalPosition) {
|
if (this.model.normalPosition) {
|
||||||
this.releaseBackground.hide(); /** 定位*/
|
this.releaseBackground.hide(); /** 定位*/
|
||||||
} else if (this.model.reversePosition) {
|
} else if (this.model.reversePosition) {
|
||||||
this.relocShelter.getSection().animateStyle(true)
|
this.relocShelter && this.relocShelter.getSection().animateStyle(true)
|
||||||
.when(1000, { fill: this.style.backgroundColor })
|
.when(1000, { fill: this.style.backgroundColor })
|
||||||
.start();
|
.start();
|
||||||
this.rhomboid.getSection().animateStyle(true)
|
this.rhomboid && this.rhomboid.getSection().animateStyle(true)
|
||||||
.when(1000, { fill: this.style.backgroundColor })
|
.when(1000, { fill: this.style.backgroundColor })
|
||||||
.start(); /** 反位*/
|
.start(); /** 反位*/
|
||||||
}
|
}
|
||||||
@ -479,8 +517,9 @@ export default class Switch extends Group {
|
|||||||
} else if (model.reversePosition) {
|
} else if (model.reversePosition) {
|
||||||
this.setInversionAction(model); /** 反位*/
|
this.setInversionAction(model); /** 反位*/
|
||||||
} else {
|
} else {
|
||||||
this.setLossAction(true);
|
this.setLossAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 道岔单锁 */
|
/** 道岔单锁 */
|
||||||
model.singleLock && this.setMonolock();
|
model.singleLock && this.setMonolock();
|
||||||
/** 道岔封锁 */
|
/** 道岔封锁 */
|
||||||
@ -490,6 +529,7 @@ export default class Switch extends Group {
|
|||||||
// this.setForkAction(); // 道岔挤岔完成
|
// this.setForkAction(); // 道岔挤岔完成
|
||||||
// 道岔使能显示
|
// 道岔使能显示
|
||||||
model.isCiConfirm && this.setCiConfirm();
|
model.isCiConfirm && this.setCiConfirm();
|
||||||
|
this.setSwitchFault(model.split);
|
||||||
model.cutOff && this.setSwitchCutOff();
|
model.cutOff && this.setSwitchCutOff();
|
||||||
if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色
|
if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色
|
||||||
const switchModel = Vue.prototype.$jlmap.mapDevice[model.code];
|
const switchModel = Vue.prototype.$jlmap.mapDevice[model.code];
|
||||||
|
@ -194,8 +194,8 @@ export default class TrainBody extends Group {
|
|||||||
textStrokeWidth: 0,
|
textStrokeWidth: 0,
|
||||||
fontSize: model.fontSize,
|
fontSize: model.fontSize,
|
||||||
fontFamily: style.Train.common.fontFamily,
|
fontFamily: style.Train.common.fontFamily,
|
||||||
textAlign: 'left',
|
textAlign: 'center',
|
||||||
textVerticalAlign: 'top'
|
textVerticalAlign: 'middle'
|
||||||
});
|
});
|
||||||
this.add(this.travelSigns);
|
this.add(this.travelSigns);
|
||||||
}
|
}
|
||||||
@ -211,8 +211,8 @@ export default class TrainBody extends Group {
|
|||||||
textStrokeWidth: 0,
|
textStrokeWidth: 0,
|
||||||
fontSize: model.fontSize,
|
fontSize: model.fontSize,
|
||||||
fontFamily: style.Train.common.fontFamily,
|
fontFamily: style.Train.common.fontFamily,
|
||||||
textAlign: 'left',
|
textAlign: 'center',
|
||||||
textVerticalAlign: 'top'
|
textVerticalAlign: 'middle'
|
||||||
});
|
});
|
||||||
this.add(this.crewNum);
|
this.add(this.crewNum);
|
||||||
}
|
}
|
||||||
@ -228,8 +228,8 @@ export default class TrainBody extends Group {
|
|||||||
textStrokeWidth: 0,
|
textStrokeWidth: 0,
|
||||||
fontSize: model.fontSize,
|
fontSize: model.fontSize,
|
||||||
fontFamily: style.Train.common.fontFamily,
|
fontFamily: style.Train.common.fontFamily,
|
||||||
textAlign: 'left',
|
textAlign: 'center',
|
||||||
textVerticalAlign: 'top'
|
textVerticalAlign: 'middle'
|
||||||
});
|
});
|
||||||
this.add(this.travelNum);
|
this.add(this.travelNum);
|
||||||
}
|
}
|
||||||
@ -245,8 +245,8 @@ export default class TrainBody extends Group {
|
|||||||
textStrokeWidth: 0,
|
textStrokeWidth: 0,
|
||||||
fontSize: model.fontSize,
|
fontSize: model.fontSize,
|
||||||
fontFamily: style.Train.common.fontFamily,
|
fontFamily: style.Train.common.fontFamily,
|
||||||
textAlign: 'left',
|
textAlign: 'center',
|
||||||
textVerticalAlign: 'top'
|
textVerticalAlign: 'middle'
|
||||||
});
|
});
|
||||||
this.add(this.delayTime);
|
this.add(this.delayTime);
|
||||||
}
|
}
|
||||||
@ -307,6 +307,23 @@ export default class TrainBody extends Group {
|
|||||||
return new BoundingRect(0, 0, 0, 0);
|
return new BoundingRect(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
getBoundingRectOfFont() { // 获取文字宽度
|
||||||
|
if (this.textTrainServer) {
|
||||||
|
const tempRect = this.textTrainServer.getBoundingRect().clone();
|
||||||
|
return tempRect;
|
||||||
|
} else if (this.textTrainTarget) {
|
||||||
|
const tempRect = this.textTrainTarget.getBoundingRect().clone();
|
||||||
|
return tempRect;
|
||||||
|
} else if (this.textTrainNumber) {
|
||||||
|
const tempRect = this.textTrainNumber.getBoundingRect().clone();
|
||||||
|
return tempRect;
|
||||||
|
} else if (this.textTrainTargetNumber) {
|
||||||
|
const tempRect = this.textTrainTargetNumber.getBoundingRect().clone();
|
||||||
|
return tempRect;
|
||||||
|
} else {
|
||||||
|
return new BoundingRect(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
setPlanRoutingTypeColor(planRoutingTypes) {
|
setPlanRoutingTypeColor(planRoutingTypes) {
|
||||||
if (planRoutingTypes === 'BIG') {
|
if (planRoutingTypes === 'BIG') {
|
||||||
this.style.Train.trainTarget.bigColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.bigColor});
|
this.style.Train.trainTarget.bigColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.bigColor});
|
||||||
|
@ -4,62 +4,65 @@ import Polygon from 'zrender/src/graphic/shape/Polygon';
|
|||||||
|
|
||||||
/** 车头*/
|
/** 车头*/
|
||||||
export default class TrainHead extends Group {
|
export default class TrainHead extends Group {
|
||||||
constructor(model) {
|
constructor(model) {
|
||||||
super();
|
super();
|
||||||
this.model = model;
|
this.model = model;
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
const style = this.model.style;
|
const style = this.model.style;
|
||||||
const baseMargin = (model.drect === -1 ? 1 : 0);
|
const baseMargin = (model.drect === -1 ? 1 : 0);
|
||||||
if (style.Train.trainHead.trainConntWidth) {
|
if (style.Train.trainHead.trainConntWidth) {
|
||||||
this.line = new Rect({
|
this.line = new Rect({
|
||||||
zlevel: model.zlevel,
|
zlevel: model.zlevel,
|
||||||
z: model.z,
|
z: model.z,
|
||||||
shape: {
|
shape: {
|
||||||
x: model.point.x - baseMargin * (style.Train.trainHead.trainConntWidth),
|
x: model.point.x - baseMargin * (style.Train.trainHead.trainConntWidth * model.scale),
|
||||||
y: model.point.y,
|
y: model.point.y,
|
||||||
width: style.Train.trainHead.trainConntWidth * model.scale,
|
width: style.Train.trainHead.trainConntWidth * model.scale,
|
||||||
height: style.Train.trainHead.trainHeadRectHeight
|
height: model.height || style.Train.trainHead.trainHeadRectHeight * model.scale
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
lineWidth: 0.1,
|
lineWidth: 0.1,
|
||||||
stroke: style.trainSidelineColor,
|
stroke: style.trainSidelineColor,
|
||||||
fill: style.Train.trainHead.trainHeadFillColor
|
fill: style.Train.trainHead.trainHeadFillColor
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.add(this.line);
|
this.add(this.line);
|
||||||
}
|
}
|
||||||
this.arrow = new Polygon({
|
const height = model.height / 2;
|
||||||
zlevel: model.zlevel,
|
const startX = model.point.x + model.drect * (style.Train.trainHead.trainConntWidth * model.scale);
|
||||||
z: model.z,
|
const points = [
|
||||||
shape: {
|
[startX + model.drect * 2 * model.scale, (model.point.y + height)],
|
||||||
points: [
|
[startX + model.drect * -2 * model.scale, (model.point.y + height) + height],
|
||||||
[model.point.x + model.drect * (style.Train.trainHead.trainHeadTriangleFirst.x), model.point.y + style.Train.trainHead.trainHeadTriangleFirst.y],
|
[startX + model.drect * -2 * model.scale, (model.point.y + height) - height]
|
||||||
[model.point.x + model.drect * (style.Train.trainHead.trainHeadTriangleSecond.x), model.point.y + style.Train.trainHead.trainHeadTriangleSecond.y],
|
];
|
||||||
[model.point.x + model.drect * (style.Train.trainHead.trainHeadTriangleThird.x), model.point.y + style.Train.trainHead.trainHeadTriangleThird.y]
|
this.arrow = new Polygon({
|
||||||
]
|
zlevel: model.zlevel,
|
||||||
},
|
z: model.z,
|
||||||
style: {
|
shape: {
|
||||||
lineWidth: 0.1,
|
points: points
|
||||||
stroke: style.trainSidelineColor,
|
},
|
||||||
fill: style.Train.trainHead.trainHeadFillColor
|
style: {
|
||||||
}
|
lineWidth: 0.1,
|
||||||
});
|
stroke: style.trainSidelineColor,
|
||||||
|
fill: style.Train.trainHead.trainHeadFillColor
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.add(this.arrow);
|
this.add(this.arrow);
|
||||||
}
|
}
|
||||||
setColor(color) {
|
setColor(color) {
|
||||||
this.line && this.line.setStyle('fill', color);
|
this.line && this.line.setStyle('fill', color);
|
||||||
this.arrow && this.arrow.setStyle('fill', color);
|
this.arrow && this.arrow.setStyle('fill', color);
|
||||||
}
|
}
|
||||||
setLineShow(isShow) {
|
setLineShow(isShow) {
|
||||||
if (this.line) {
|
if (this.line) {
|
||||||
isShow ? this.line.show() : this.line.hide();
|
isShow ? this.line.show() : this.line.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setArrowShow(isShow) {
|
setArrowShow(isShow) {
|
||||||
isShow ? this.arrow.show() : this.arrow.hide();
|
isShow ? this.arrow.show() : this.arrow.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,6 +87,8 @@ export default class Train extends Group {
|
|||||||
dt: model.dt,
|
dt: model.dt,
|
||||||
model: model
|
model: model
|
||||||
});
|
});
|
||||||
|
const rect = this.trainB.getBoundingRectOfFont().clone();
|
||||||
|
const height = rect.height;
|
||||||
this.trainL = new TrainHead({
|
this.trainL = new TrainHead({
|
||||||
style: style,
|
style: style,
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
@ -96,6 +98,8 @@ export default class Train extends Group {
|
|||||||
y: this.point.y
|
y: this.point.y
|
||||||
},
|
},
|
||||||
drect: -1,
|
drect: -1,
|
||||||
|
height: height,
|
||||||
|
fontSize: this.fontSize,
|
||||||
scale: this.newScale
|
scale: this.newScale
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -108,6 +112,8 @@ export default class Train extends Group {
|
|||||||
y: this.point.y
|
y: this.point.y
|
||||||
},
|
},
|
||||||
drect: 1,
|
drect: 1,
|
||||||
|
height: height,
|
||||||
|
fontSize: this.fontSize,
|
||||||
scale: this.newScale
|
scale: this.newScale
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ import AutomaticRoute from './AutomacticRoute/index.js';
|
|||||||
import SaidLamp from './SaidLamp/index.js';
|
import SaidLamp from './SaidLamp/index.js';
|
||||||
import SplitStation from './SplitStation/index';
|
import SplitStation from './SplitStation/index';
|
||||||
import Arrow from './Arrow/index';
|
import Arrow from './Arrow/index';
|
||||||
|
import Power from './Power/index';
|
||||||
|
|
||||||
/** 图库*/
|
/** 图库*/
|
||||||
const mapShape = {};
|
const mapShape = {};
|
||||||
@ -69,6 +70,7 @@ mapShape[deviceType.Axle] = SaidLamp;
|
|||||||
mapShape[deviceType.SwitchFault] = SaidLamp;
|
mapShape[deviceType.SwitchFault] = SaidLamp;
|
||||||
mapShape[deviceType.SplitStation] = SplitStation;
|
mapShape[deviceType.SplitStation] = SplitStation;
|
||||||
mapShape[deviceType.Arrow] = Arrow;
|
mapShape[deviceType.Arrow] = Arrow;
|
||||||
|
mapShape[deviceType.Power] = Power;
|
||||||
|
|
||||||
function shapefactory(device, jmap) {
|
function shapefactory(device, jmap) {
|
||||||
const type = device._type;
|
const type = device._type;
|
||||||
|
@ -1,222 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="beijing-01__systerm stand-stop-time"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="340px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
|
||||||
<div style="width: 96%;">
|
|
||||||
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
|
|
||||||
<!-- <el-input v-model="addModel.tripNumber" /> -->
|
|
||||||
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
|
|
||||||
<el-option
|
|
||||||
v-for="tripNum in tripNumberList"
|
|
||||||
:key="tripNum"
|
|
||||||
:label="tripNum"
|
|
||||||
:value="tripNum"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="服 务 号:" label-width="95px" prop="serviceNumber">
|
|
||||||
<!-- <el-input v-model="addModel.serviceNumber" /> -->
|
|
||||||
<el-select v-model="addModel.serviceNumber" filterable>
|
|
||||||
<el-option
|
|
||||||
v-for="serviceNumber in serviceNumberList"
|
|
||||||
:key="serviceNumber"
|
|
||||||
:label="serviceNumber"
|
|
||||||
:value="serviceNumber"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
// name: 'TrainMove',
|
|
||||||
name: 'TrainAddPlan',
|
|
||||||
components: {
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
trainNoList: [],
|
|
||||||
selected: null,
|
|
||||||
tripNumberList: [],
|
|
||||||
serviceNumberList: [],
|
|
||||||
addModel: {
|
|
||||||
serviceNumber: '', // 服务号
|
|
||||||
tripNumber: '' // 车次号
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
serviceNumber: [
|
|
||||||
{ required: true, message: '请输入服务号', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
tripNumber: [
|
|
||||||
{ required: true, message: '请输入车次号', trigger: 'change' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'trainList',
|
|
||||||
'stationStandList',
|
|
||||||
'trainWindowSectionCode'
|
|
||||||
]),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '创建计划车';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
tripNumberChange(tripNumber) {
|
|
||||||
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
|
|
||||||
this.serviceNumberList = [];
|
|
||||||
if (typeof resp.data == 'string') {
|
|
||||||
this.serviceNumberList.push(resp.data);
|
|
||||||
} else {
|
|
||||||
resp.data.forEach(item => {
|
|
||||||
if (!this.serviceNumberList.includes(item)) {
|
|
||||||
this.serviceNumberList.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (this.serviceNumberList.length === 1) {
|
|
||||||
this.addModel.serviceNumber = this.serviceNumberList[0];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
|
|
||||||
}
|
|
||||||
this.addModel = {
|
|
||||||
tripNumber:'',
|
|
||||||
serviceNumber:''
|
|
||||||
};
|
|
||||||
getTripNumberList(this.$route.query.group).then(resp => {
|
|
||||||
this.tripNumberList = [];
|
|
||||||
resp.data.forEach(item => {
|
|
||||||
if (!this.tripNumberList.includes(item)) {
|
|
||||||
this.tripNumberList.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}).catch(() => {
|
|
||||||
// this.$messageBox(error.message);
|
|
||||||
});
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
|
||||||
// mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Train.createPlanTrain.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_Train_Init_Plan,
|
|
||||||
param: {
|
|
||||||
serviceNumber: this.addModel.serviceNumber, // 服务号
|
|
||||||
tripNumber: this.addModel.tripNumber // 车次号
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => { this.doClose(); });
|
|
||||||
},
|
|
||||||
handerTrainSource() {
|
|
||||||
const operate = {
|
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
operation: OperationEvent.Train.trainSource.menu.operation,
|
|
||||||
val: this.addModel.trainSource
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.beijing-01__systerm .el-dialog .base-label {
|
|
||||||
background: rgba(0, 0, 0, x);
|
|
||||||
position: relative;
|
|
||||||
left: -5px;
|
|
||||||
top: -18px;
|
|
||||||
padding: 0 5px;
|
|
||||||
background-color: #F0F0F0;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -5,8 +5,6 @@
|
|||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
<alxe-effective ref="alxeEffective" />
|
<alxe-effective ref="alxeEffective" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
<train-add-plan ref="trainAddPlan" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -23,8 +21,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import TrainAddPlan from './dialog/trainAddPlan';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionMenu',
|
name: 'SectionMenu',
|
||||||
@ -33,9 +29,7 @@ export default {
|
|||||||
SectionControl,
|
SectionControl,
|
||||||
SpeedLimitControl,
|
SpeedLimitControl,
|
||||||
AlxeEffective,
|
AlxeEffective,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault,
|
|
||||||
TrainAddPlan
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -183,7 +177,7 @@ export default {
|
|||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainAddPlan.doShow(operate, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', operate);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -277,7 +271,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -285,7 +279,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<password-box ref="password" @checkOver="passWordCommit" />
|
<password-box ref="password" @checkOver="passWordCommit" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -24,10 +23,8 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
|||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from './utils/menuItemStatus';
|
|
||||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SignalMenu',
|
name: 'SignalMenu',
|
||||||
@ -38,8 +35,7 @@ export default {
|
|||||||
RouteHandControl,
|
RouteHandControl,
|
||||||
RouteDetail,
|
RouteDetail,
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
PasswordBox,
|
PasswordBox
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -94,16 +90,16 @@ export default {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '设置故障',
|
label: '设置故障',
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage,
|
||||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消故障',
|
label: '取消故障',
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage,
|
||||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -284,7 +280,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -292,7 +288,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
<stand-stop-time ref="standStopTime" />
|
<stand-stop-time ref="standStopTime" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<stand-back-strategy ref="standBackStrategy" />
|
<stand-back-strategy ref="standBackStrategy" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -27,9 +26,7 @@ import {DeviceMenu } from '@/scripts/ConstDic';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { mouseCancelState } from './utils/menuItemStatus';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationStandMenu',
|
name: 'StationStandMenu',
|
||||||
@ -41,8 +38,7 @@ export default {
|
|||||||
StandRunLevel,
|
StandRunLevel,
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
StandBackStrategy,
|
StandBackStrategy,
|
||||||
StandStopTime,
|
StandStopTime
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -202,7 +198,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -210,7 +206,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
<alxe-effective ref="alxeEffective" />
|
<alxe-effective ref="alxeEffective" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -24,7 +23,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchMenu',
|
name: 'SwitchMenu',
|
||||||
@ -34,8 +32,7 @@ export default {
|
|||||||
SwitchControl,
|
SwitchControl,
|
||||||
SpeedLimitControl,
|
SpeedLimitControl,
|
||||||
AlxeEffective,
|
AlxeEffective,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -196,7 +193,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -204,7 +201,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -196,7 +196,16 @@ export const menuOperate = {
|
|||||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||||
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
Common: {
|
||||||
|
setFault: {
|
||||||
|
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
|
||||||
|
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||||
|
},
|
||||||
|
cancelFault: {
|
||||||
|
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
|
||||||
|
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,214 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="chengdou-01__system stand-stop-time"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="480px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<div class="el-dialog-div">
|
|
||||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules" label-position="left">
|
|
||||||
<el-form-item label="车次号:" prop="tripNumber">
|
|
||||||
<!--<el-input v-model="addModel.tripNumber"/>-->
|
|
||||||
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
|
|
||||||
<el-option
|
|
||||||
v-for="tripNum in tripNumberList"
|
|
||||||
:key="tripNum"
|
|
||||||
:label="tripNum"
|
|
||||||
:value="tripNum"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="服务号:" prop="serviceNumber">
|
|
||||||
<!-- <el-input v-model="serviceNumber" disabled="true"/> -->
|
|
||||||
<el-select v-model="addModel.serviceNumber" filterable>
|
|
||||||
<el-option
|
|
||||||
v-for="serviceNumber in serviceNumberList"
|
|
||||||
:key="serviceNumber"
|
|
||||||
:label="serviceNumber"
|
|
||||||
:value="serviceNumber"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'TrainCreateNumber',
|
|
||||||
mixins: [
|
|
||||||
CancelMouseState
|
|
||||||
],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
trainNoList: [],
|
|
||||||
selected: null,
|
|
||||||
sectionName: '',
|
|
||||||
tripNumberList: [],
|
|
||||||
serviceNumberList: [],
|
|
||||||
addModel: {
|
|
||||||
tripNumber:'',
|
|
||||||
serviceNumber: ''
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
serverNumber: [
|
|
||||||
{ required: true, message: '请输入服务号', trigger: 'blur'}
|
|
||||||
],
|
|
||||||
tripNumber: [
|
|
||||||
{ required: true, message: '请输入车次号', trigger: 'blur'}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'trainList',
|
|
||||||
'stationStandList',
|
|
||||||
'trainWindowSectionCode'
|
|
||||||
]),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '新建计划车';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
loadInitData(map) {
|
|
||||||
},
|
|
||||||
tripNumberChange(tripNumber) {
|
|
||||||
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
|
|
||||||
this.serviceNumberList = [];
|
|
||||||
if (typeof resp.data == 'string') {
|
|
||||||
this.serviceNumberList.push(resp.data);
|
|
||||||
} else {
|
|
||||||
resp.data.forEach(item => {
|
|
||||||
if (!this.serviceNumberList.includes(item)) {
|
|
||||||
this.serviceNumberList.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (this.serviceNumberList.length === 1) {
|
|
||||||
this.addModel.serviceNumber = this.serviceNumberList[0];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
|
||||||
this.addModel = {
|
|
||||||
tripNumber:'',
|
|
||||||
serviceNumber:''
|
|
||||||
};
|
|
||||||
getTripNumberList(this.$route.query.group).then(resp => {
|
|
||||||
this.tripNumberList = [];
|
|
||||||
resp.data.forEach(item => {
|
|
||||||
if (!this.tripNumberList.includes(item)) {
|
|
||||||
this.tripNumberList.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}).catch(() => {
|
|
||||||
// this.$messageBox(error.message);
|
|
||||||
});
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Train.createPlanTrain.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_Train_Init_Plan,
|
|
||||||
param: {
|
|
||||||
serviceNumber: this.addModel.serviceNumber, // 服务号
|
|
||||||
tripNumber: this.addModel.tripNumber // 车次号
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => { this.doClose(); });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.chengdou-03__systerm .el-dialog .base-label {
|
|
||||||
background: rgba(0, 0, 0, x);
|
|
||||||
position: relative;
|
|
||||||
left: -5px;
|
|
||||||
top: -18px;
|
|
||||||
padding: 0 5px;
|
|
||||||
background-color: #F0F0F0;
|
|
||||||
}
|
|
||||||
.el-dialog-div {
|
|
||||||
height: 300px;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -5,8 +5,6 @@
|
|||||||
<section-control ref="sectionControl" />
|
<section-control ref="sectionControl" />
|
||||||
<section-cmd-control ref="sectionCmdControl" />
|
<section-cmd-control ref="sectionCmdControl" />
|
||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
<train-init-plan ref="trainInitPlan" />
|
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -21,9 +19,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
import TrainInitPlan from './dialog/trainInitPlan';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionMenu',
|
name: 'SectionMenu',
|
||||||
@ -32,9 +28,7 @@ export default {
|
|||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
SpeedLimitControl,
|
SpeedLimitControl,
|
||||||
SectionControl,
|
SectionControl,
|
||||||
SectionCmdControl,
|
SectionCmdControl
|
||||||
SetFault,
|
|
||||||
TrainInitPlan
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -139,7 +133,7 @@ export default {
|
|||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainInitPlan.doShow(step, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', step);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -180,7 +174,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -188,7 +182,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<pop-menu ref="popMenu" :menu="menu" :pop-class="popClass" />
|
<pop-menu ref="popMenu" :menu="menu" :pop-class="popClass" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<create-device-label ref="createDeviceLabel" />
|
<create-device-label ref="createDeviceLabel" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -16,7 +15,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -24,8 +22,7 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
CreateDeviceLabel,
|
CreateDeviceLabel
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -260,7 +257,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -268,7 +265,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<platform-dwell ref="platformDwell" />
|
<platform-dwell ref="platformDwell" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -16,7 +15,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -24,8 +22,7 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
PlatformDwell,
|
PlatformDwell
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -143,7 +140,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -151,7 +148,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<switch-control ref="switchControl" />
|
<switch-control ref="switchControl" />
|
||||||
<create-device-label ref="createDeviceLabel" />
|
<create-device-label ref="createDeviceLabel" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -19,7 +18,6 @@ import { mapGetters } from 'vuex';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -28,8 +26,7 @@ export default {
|
|||||||
PopMenu,
|
PopMenu,
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
CreateDeviceLabel,
|
CreateDeviceLabel,
|
||||||
SwitchControl,
|
SwitchControl
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
mixins: [
|
mixins: [
|
||||||
CancelMouseState
|
CancelMouseState
|
||||||
@ -183,7 +180,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -191,7 +188,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -215,11 +215,11 @@ export const menuOperate = {
|
|||||||
},
|
},
|
||||||
Common: {
|
Common: {
|
||||||
setFault: {
|
setFault: {
|
||||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
|
||||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||||
},
|
},
|
||||||
cancelFault: {
|
cancelFault: {
|
||||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
|
||||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,208 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="chengdou-03__systerm stand-stop-time"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="480px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<div class="el-dialog-div">
|
|
||||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules" label-position="left">
|
|
||||||
<el-form-item label="车次号:" prop="tripNumber">
|
|
||||||
<!--<el-input v-model="addModel.tripNumber"/>-->
|
|
||||||
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
|
|
||||||
<el-option
|
|
||||||
v-for="tripNum in tripNumberList"
|
|
||||||
:key="tripNum"
|
|
||||||
:label="tripNum"
|
|
||||||
:value="tripNum"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="服务号:" prop="serviceNumber">
|
|
||||||
<el-select v-model="addModel.serviceNumber" filterable>
|
|
||||||
<el-option
|
|
||||||
v-for="serviceNumber in serviceNumberList"
|
|
||||||
:key="serviceNumber"
|
|
||||||
:label="serviceNumber"
|
|
||||||
:value="serviceNumber"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'TrainCreateNumber',
|
|
||||||
mixins: [
|
|
||||||
CancelMouseState
|
|
||||||
],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
trainNoList: [],
|
|
||||||
selected: null,
|
|
||||||
sectionName: '',
|
|
||||||
tripNumberList: [],
|
|
||||||
serviceNumberList: [],
|
|
||||||
addModel: {
|
|
||||||
tripNumber:'',
|
|
||||||
serviceNumber: ''
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
serviceNumber: [
|
|
||||||
{ required: true, message: '请输入服务号', trigger: 'change'}
|
|
||||||
],
|
|
||||||
tripNumber: [
|
|
||||||
{ required: true, message: '请输入车次号', trigger: 'blur'}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'trainList',
|
|
||||||
'stationStandList',
|
|
||||||
'trainWindowSectionCode'
|
|
||||||
]),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '新建计划车';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
tripNumberChange(tripNumber) {
|
|
||||||
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
|
|
||||||
this.serviceNumberList = [];
|
|
||||||
resp.data.forEach(item => {
|
|
||||||
if (!this.serviceNumberList.includes(item)) {
|
|
||||||
this.serviceNumberList.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
if (this.serviceNumberList.length === 1) {
|
|
||||||
this.addModel.serviceNumber = this.serviceNumberList[0];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
|
||||||
this.addModel = {
|
|
||||||
tripNumber:'',
|
|
||||||
serviceNumber: ''
|
|
||||||
};
|
|
||||||
getTripNumberList(this.$route.query.group).then(resp => {
|
|
||||||
this.tripNumberList = [];
|
|
||||||
resp.data.forEach(item => {
|
|
||||||
if (!this.tripNumberList.includes(item)) {
|
|
||||||
this.tripNumberList.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}).catch(() => {
|
|
||||||
// this.$messageBox(error.message);
|
|
||||||
});
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Train.createPlanTrain.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_Train_Init_Plan,
|
|
||||||
param: {
|
|
||||||
serviceNumber: this.addModel.serviceNumber, // 服务号
|
|
||||||
tripNumber: this.addModel.tripNumber // 车次号
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
|
||||||
// this.$messageBox(error.message);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => { this.doClose(); });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.chengdou-03__systerm .el-dialog .base-label {
|
|
||||||
background: rgba(0, 0, 0, x);
|
|
||||||
position: relative;
|
|
||||||
left: -5px;
|
|
||||||
top: -18px;
|
|
||||||
padding: 0 5px;
|
|
||||||
background-color: #F0F0F0;
|
|
||||||
}
|
|
||||||
.el-dialog-div {
|
|
||||||
height: 300px;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -5,8 +5,6 @@
|
|||||||
<train-create ref="trainCreate" />
|
<train-create ref="trainCreate" />
|
||||||
<section-detail ref="sectionDetail" />
|
<section-detail ref="sectionDetail" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
<train-init-plan ref="trainInitPlan" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -21,9 +19,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
import TrainInitPlan from './dialog/trainInitPlan';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionMenu',
|
name: 'SectionMenu',
|
||||||
@ -32,9 +28,7 @@ export default {
|
|||||||
SectionControl,
|
SectionControl,
|
||||||
SectionDetail,
|
SectionDetail,
|
||||||
TrainCreate,
|
TrainCreate,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault,
|
|
||||||
TrainInitPlan
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -201,7 +195,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -209,7 +203,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -234,7 +228,7 @@ export default {
|
|||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainInitPlan.doShow(step, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', step);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
<route-hand-control ref="routeHandControl" />
|
<route-hand-control ref="routeHandControl" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -26,7 +25,6 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
|||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import PasswordBox from './dialog/childDialog/passwordInputBox';
|
import PasswordBox from './dialog/childDialog/passwordInputBox';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -39,8 +37,7 @@ export default {
|
|||||||
RouteDetail,
|
RouteDetail,
|
||||||
RouteGuide,
|
RouteGuide,
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
PasswordBox,
|
PasswordBox
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -233,7 +230,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -241,7 +238,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
<stand-control ref="standControl" />
|
<stand-control ref="standControl" />
|
||||||
<stand-detail ref="standDetail" />
|
<stand-detail ref="standDetail" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -18,7 +17,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -27,8 +25,7 @@ export default {
|
|||||||
PopMenu,
|
PopMenu,
|
||||||
StandControl,
|
StandControl,
|
||||||
StandDetail,
|
StandDetail,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -157,7 +154,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -165,7 +162,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
<section-control ref="sectionControl" />
|
<section-control ref="sectionControl" />
|
||||||
<switch-control ref="switchControl" />
|
<switch-control ref="switchControl" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -20,7 +19,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchMenu',
|
name: 'SwitchMenu',
|
||||||
@ -28,8 +26,7 @@ export default {
|
|||||||
PopMenu,
|
PopMenu,
|
||||||
SectionControl,
|
SectionControl,
|
||||||
SwitchControl,
|
SwitchControl,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
mixins: [
|
mixins: [
|
||||||
CancelMouseState
|
CancelMouseState
|
||||||
@ -156,7 +153,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -164,7 +161,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -215,11 +215,11 @@ export const menuOperate = {
|
|||||||
},
|
},
|
||||||
Common: {
|
Common: {
|
||||||
setFault: {
|
setFault: {
|
||||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
|
||||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||||
},
|
},
|
||||||
cancelFault: {
|
cancelFault: {
|
||||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
|
||||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,212 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="foshan-01__systerm stand-stop-time"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="340px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
|
||||||
<div style="width: 96%;">
|
|
||||||
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
|
|
||||||
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
|
|
||||||
<el-option
|
|
||||||
v-for="tripNum in tripNumberList"
|
|
||||||
:key="tripNum"
|
|
||||||
:label="tripNum"
|
|
||||||
:value="tripNum"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="服 务 号:" label-width="95px" prop="serviceNumber">
|
|
||||||
<el-select v-model="addModel.serviceNumber" filterable>
|
|
||||||
<el-option
|
|
||||||
v-for="serviceNumber in serviceNumberList"
|
|
||||||
:key="serviceNumber"
|
|
||||||
:label="serviceNumber"
|
|
||||||
:value="serviceNumber"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
// name: 'TrainMove',
|
|
||||||
name: 'TrainAddPlan',
|
|
||||||
components: {
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
trainNoList: [],
|
|
||||||
selected: null,
|
|
||||||
tripNumberList: [],
|
|
||||||
serviceNumberList: [],
|
|
||||||
addModel: {
|
|
||||||
serviceNumber: '', // 服务号
|
|
||||||
tripNumber: '' // 车次号
|
|
||||||
},
|
|
||||||
|
|
||||||
rules: {
|
|
||||||
serviceNumber: [
|
|
||||||
{ required: true, message: '请输入服务号', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
tripNumber: [
|
|
||||||
{ required: true, message: '请输入车次号', trigger: 'change' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'trainList',
|
|
||||||
'stationStandList',
|
|
||||||
'trainWindowSectionCode'
|
|
||||||
]),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '创建计划车';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
tripNumberChange(tripNumber) {
|
|
||||||
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
|
|
||||||
this.serviceNumberList = [];
|
|
||||||
if (typeof resp.data == 'string') {
|
|
||||||
this.serviceNumberList.push(resp.data);
|
|
||||||
} else {
|
|
||||||
resp.data.forEach(item => {
|
|
||||||
if (!this.serviceNumberList.includes(item)) {
|
|
||||||
this.serviceNumberList.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (this.serviceNumberList.length === 1) {
|
|
||||||
this.addModel.serviceNumber = this.serviceNumberList[0];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
|
||||||
// if (!this.dialogShow) {
|
|
||||||
|
|
||||||
// }
|
|
||||||
this.addModel = {
|
|
||||||
tripNumber:'',
|
|
||||||
serviceNumber:''
|
|
||||||
};
|
|
||||||
getTripNumberList(this.$route.query.group).then(resp => {
|
|
||||||
this.tripNumberList = [];
|
|
||||||
resp.data.forEach(item => {
|
|
||||||
if (!this.tripNumberList.includes(item)) {
|
|
||||||
this.tripNumberList.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
// this.$messageBox(error.message);
|
|
||||||
});
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
|
||||||
// this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Train.createPlanTrain.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_Train_Init_Plan,
|
|
||||||
param: {
|
|
||||||
serviceNumber: this.addModel.serviceNumber, // 服务号
|
|
||||||
tripNumber: this.addModel.tripNumber // 车次号
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store
|
|
||||||
.dispatch('training/nextNew', operate)
|
|
||||||
.then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.foshan-01__systerm .el-dialog .base-label {
|
|
||||||
background: rgba(0, 0, 0, x);
|
|
||||||
position: relative;
|
|
||||||
left: -5px;
|
|
||||||
top: -18px;
|
|
||||||
padding: 0 5px;
|
|
||||||
background-color: #F0F0F0;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -5,8 +5,6 @@
|
|||||||
<section-un-lock ref="sectionUnLock" />
|
<section-un-lock ref="sectionUnLock" />
|
||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<train-add-plan ref="trainAddPlan" />
|
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -21,8 +19,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import TrainAddPlan from './dialog/trainAddPlan';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -32,9 +28,7 @@ export default {
|
|||||||
SectionControl,
|
SectionControl,
|
||||||
SectionUnLock,
|
SectionUnLock,
|
||||||
SpeedLimitControl,
|
SpeedLimitControl,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault,
|
|
||||||
TrainAddPlan
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -166,7 +160,7 @@ export default {
|
|||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainAddPlan.doShow(step, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', step);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -174,7 +168,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -182,7 +176,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" />
|
||||||
<router-command ref="routerCommand" />
|
<router-command ref="routerCommand" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -23,7 +22,6 @@ import RouteHandControl from './dialog/routeHandControl';
|
|||||||
import RouterCommand from './dialog/routerCommand';
|
import RouterCommand from './dialog/routerCommand';
|
||||||
import RouteDetail from './dialog/routeDetail';
|
import RouteDetail from './dialog/routeDetail';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
@ -43,8 +41,7 @@ export default {
|
|||||||
RouteHandControl,
|
RouteHandControl,
|
||||||
RouteDetail,
|
RouteDetail,
|
||||||
RouterCommand,
|
RouterCommand,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -220,7 +217,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -228,7 +225,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
<stand-back-strategy ref="standBackStrategy" />
|
<stand-back-strategy ref="standBackStrategy" />
|
||||||
<stand-detain-train-all ref="standDetainTrainAll" />
|
<stand-detain-train-all ref="standDetainTrainAll" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -29,7 +28,6 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
|||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationStandMenu',
|
name: 'StationStandMenu',
|
||||||
@ -42,8 +40,7 @@ export default {
|
|||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
StandBackStrategy,
|
StandBackStrategy,
|
||||||
StandStopTime,
|
StandStopTime,
|
||||||
StandDetainTrainAll,
|
StandDetainTrainAll
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -199,7 +196,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -207,7 +204,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
<switch-un-lock ref="switchUnLock" />
|
<switch-un-lock ref="switchUnLock" />
|
||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -21,7 +20,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchMenu',
|
name: 'SwitchMenu',
|
||||||
@ -30,8 +28,7 @@ export default {
|
|||||||
SwitchControl,
|
SwitchControl,
|
||||||
SwitchUnLock,
|
SwitchUnLock,
|
||||||
SpeedLimitControl,
|
SpeedLimitControl,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -148,7 +145,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -156,7 +153,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -215,11 +215,11 @@ export const menuOperate = {
|
|||||||
},
|
},
|
||||||
Common: {
|
Common: {
|
||||||
setFault: {
|
setFault: {
|
||||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
|
||||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||||
},
|
},
|
||||||
cancelFault: {
|
cancelFault: {
|
||||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
|
||||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,212 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="fuzhou-01__systerm stand-stop-time"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="340px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
|
||||||
<div style="width: 96%;">
|
|
||||||
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
|
|
||||||
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
|
|
||||||
<el-option
|
|
||||||
v-for="tripNum in tripNumberList"
|
|
||||||
:key="tripNum"
|
|
||||||
:label="tripNum"
|
|
||||||
:value="tripNum"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="服 务 号:" label-width="95px" prop="serviceNumber">
|
|
||||||
<el-select v-model="addModel.serviceNumber" filterable>
|
|
||||||
<el-option
|
|
||||||
v-for="serviceNumber in serviceNumberList"
|
|
||||||
:key="serviceNumber"
|
|
||||||
:label="serviceNumber"
|
|
||||||
:value="serviceNumber"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
// name: 'TrainMove',
|
|
||||||
name: 'TrainAddPlan',
|
|
||||||
components: {
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
trainNoList: [],
|
|
||||||
selected: null,
|
|
||||||
tripNumberList: [],
|
|
||||||
serviceNumberList: [],
|
|
||||||
addModel: {
|
|
||||||
serviceNumber: '', // 服务号
|
|
||||||
tripNumber: '' // 车次号
|
|
||||||
},
|
|
||||||
|
|
||||||
rules: {
|
|
||||||
serviceNumber: [
|
|
||||||
{ required: true, message: '请输入服务号', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
tripNumber: [
|
|
||||||
{ required: true, message: '请输入车次号', trigger: 'change' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'trainList',
|
|
||||||
'stationStandList',
|
|
||||||
'trainWindowSectionCode'
|
|
||||||
]),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '创建计划车';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
tripNumberChange(tripNumber) {
|
|
||||||
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
|
|
||||||
this.serviceNumberList = [];
|
|
||||||
if (typeof resp.data == 'string') {
|
|
||||||
this.serviceNumberList.push(resp.data);
|
|
||||||
} else {
|
|
||||||
resp.data.forEach(item => {
|
|
||||||
if (!this.serviceNumberList.includes(item)) {
|
|
||||||
this.serviceNumberList.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (this.serviceNumberList.length === 1) {
|
|
||||||
this.addModel.serviceNumber = this.serviceNumberList[0];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
|
||||||
// if (!this.dialogShow) {
|
|
||||||
|
|
||||||
// }
|
|
||||||
this.addModel = {
|
|
||||||
tripNumber:'',
|
|
||||||
serviceNumber:''
|
|
||||||
};
|
|
||||||
getTripNumberList(this.$route.query.group).then(resp => {
|
|
||||||
this.tripNumberList = [];
|
|
||||||
resp.data.forEach(item => {
|
|
||||||
if (!this.tripNumberList.includes(item)) {
|
|
||||||
this.tripNumberList.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
// this.$messageBox(error.message);
|
|
||||||
});
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
|
||||||
// this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Train.createPlanTrain.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_Train_Init_Plan,
|
|
||||||
param: {
|
|
||||||
serviceNumber: this.addModel.serviceNumber, // 服务号
|
|
||||||
tripNumber: this.addModel.tripNumber // 车次号
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store
|
|
||||||
.dispatch('training/nextNew', operate)
|
|
||||||
.then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.foshan-01__systerm .el-dialog .base-label {
|
|
||||||
background: rgba(0, 0, 0, x);
|
|
||||||
position: relative;
|
|
||||||
left: -5px;
|
|
||||||
top: -18px;
|
|
||||||
padding: 0 5px;
|
|
||||||
background-color: #F0F0F0;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -5,8 +5,6 @@
|
|||||||
<section-cmd-control ref="sectionCmdControl" />
|
<section-cmd-control ref="sectionCmdControl" />
|
||||||
<speed-cmd-control ref="speedCmdControl" />
|
<speed-cmd-control ref="speedCmdControl" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
<train-add-plan ref="trainAddPlan" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -22,9 +20,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
import TrainAddPlan from './dialog/trainAddPlan';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionMenu',
|
name: 'SectionMenu',
|
||||||
@ -33,9 +29,7 @@ export default {
|
|||||||
SectionControl,
|
SectionControl,
|
||||||
SectionCmdControl,
|
SectionCmdControl,
|
||||||
SpeedCmdControl,
|
SpeedCmdControl,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault,
|
|
||||||
TrainAddPlan
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -202,7 +196,7 @@ export default {
|
|||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainAddPlan.doShow(step, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', step);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -222,7 +216,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -230,7 +224,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
<route-hand-control ref="routeHandControl" />
|
<route-hand-control ref="routeHandControl" />
|
||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -27,7 +26,6 @@ import { mapGetters } from 'vuex';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import { querySignalStatus } from '@/api/simulation';
|
import { querySignalStatus } from '@/api/simulation';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -40,8 +38,7 @@ export default {
|
|||||||
RouteCmdControl,
|
RouteCmdControl,
|
||||||
RouteHandControl,
|
RouteHandControl,
|
||||||
RouteDetail,
|
RouteDetail,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -220,7 +217,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -228,7 +225,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
<stand-detain-train-all ref="standDetainTrainAll" />
|
<stand-detain-train-all ref="standDetainTrainAll" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<stand-back-strategy ref="standBackStrategy" />
|
<stand-back-strategy ref="standBackStrategy" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -27,7 +26,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -40,8 +38,7 @@ export default {
|
|||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
StandBackStrategy,
|
StandBackStrategy,
|
||||||
StandStopTime,
|
StandStopTime,
|
||||||
StandDetainTrainAll,
|
StandDetainTrainAll
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -225,7 +222,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -233,7 +230,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
<switch-cmd-control ref="switchCmdControl" />
|
<switch-cmd-control ref="switchCmdControl" />
|
||||||
<speed-cmd-control ref="speedCmdControl" />
|
<speed-cmd-control ref="speedCmdControl" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -20,7 +19,6 @@ import { mapGetters } from 'vuex';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -30,8 +28,7 @@ export default {
|
|||||||
SwitchControl,
|
SwitchControl,
|
||||||
SwitchCmdControl,
|
SwitchCmdControl,
|
||||||
SpeedCmdControl,
|
SpeedCmdControl,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -244,7 +241,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -252,7 +249,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -266,11 +266,11 @@ export const menuOperate = {
|
|||||||
},
|
},
|
||||||
Common: {
|
Common: {
|
||||||
setFault: {
|
setFault: {
|
||||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
|
||||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||||
},
|
},
|
||||||
cancelFault: {
|
cancelFault: {
|
||||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
|
||||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,210 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="haerbin-01__systerm stand-stop-time"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="300px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<div class="el-dialog-div">
|
|
||||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules" label-position="left">
|
|
||||||
<el-form-item label="车次号:" prop="tripNumber">
|
|
||||||
<!--<el-input v-model="addModel.tripNumber"/>-->
|
|
||||||
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
|
|
||||||
<el-option
|
|
||||||
v-for="tripNum in tripNumberList"
|
|
||||||
:key="tripNum"
|
|
||||||
:label="tripNum"
|
|
||||||
:value="tripNum"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="服务号:" prop="serviceNumber">
|
|
||||||
<el-select v-model="addModel.serviceNumber" filterable>
|
|
||||||
<el-option
|
|
||||||
v-for="serviceNumber in serviceNumberList"
|
|
||||||
:key="serviceNumber"
|
|
||||||
:label="serviceNumber"
|
|
||||||
:value="serviceNumber"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'TrainCreateNumber',
|
|
||||||
mixins: [
|
|
||||||
CancelMouseState
|
|
||||||
],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
trainNoList: [],
|
|
||||||
selected: null,
|
|
||||||
sectionName: '',
|
|
||||||
tripNumberList: [],
|
|
||||||
serviceNumberList: [],
|
|
||||||
addModel: {
|
|
||||||
tripNumber:'',
|
|
||||||
serviceNumber: ''
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
serviceNumber: [
|
|
||||||
{ required: true, message: '请输入服务号', trigger: 'change'}
|
|
||||||
],
|
|
||||||
tripNumber: [
|
|
||||||
{ required: true, message: '请输入车次号', trigger: 'blur'}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'trainList',
|
|
||||||
'stationStandList',
|
|
||||||
'trainWindowSectionCode'
|
|
||||||
]),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '新建计划车';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
tripNumberChange(tripNumber) {
|
|
||||||
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
|
|
||||||
this.serviceNumberList = [];
|
|
||||||
resp.data.forEach(item => {
|
|
||||||
if (!this.serviceNumberList.includes(item)) {
|
|
||||||
this.serviceNumberList.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
if (this.serviceNumberList.length === 1) {
|
|
||||||
this.addModel.serviceNumber = this.serviceNumberList[0];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
|
||||||
this.addModel = {
|
|
||||||
tripNumber:'',
|
|
||||||
serviceNumber: ''
|
|
||||||
};
|
|
||||||
getTripNumberList(this.$route.query.group).then(resp => {
|
|
||||||
this.tripNumberList = [];
|
|
||||||
resp.data.forEach(item => {
|
|
||||||
if (!this.tripNumberList.includes(item)) {
|
|
||||||
this.tripNumberList.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
// this.$messageBox(error.message);
|
|
||||||
});
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Train.createPlanTrain.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_Train_Init_Plan,
|
|
||||||
param: {
|
|
||||||
serviceNumber: this.addModel.serviceNumber, // 服务号
|
|
||||||
tripNumber: this.addModel.tripNumber // 车次号
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
onsole.log(error);
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
|
||||||
// this.$messageBox(error.message);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => { this.doClose(); });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.chengdou-03__systerm .el-dialog .base-label {
|
|
||||||
background: rgba(0, 0, 0, x);
|
|
||||||
position: relative;
|
|
||||||
left: -5px;
|
|
||||||
top: -18px;
|
|
||||||
padding: 0 5px;
|
|
||||||
background-color: #F0F0F0;
|
|
||||||
}
|
|
||||||
.el-dialog-div {
|
|
||||||
height: 200px;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -5,8 +5,6 @@
|
|||||||
<section-cmd-control ref="sectionCmdControl" />
|
<section-cmd-control ref="sectionCmdControl" />
|
||||||
<speed-cmd-control ref="speedCmdControl" />
|
<speed-cmd-control ref="speedCmdControl" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
<train-init-plan ref="trainInitPlan" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -21,9 +19,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
import TrainInitPlan from './dialog/trainInitPlan';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionMenu',
|
name: 'SectionMenu',
|
||||||
@ -32,9 +28,7 @@ export default {
|
|||||||
SectionControl,
|
SectionControl,
|
||||||
SectionCmdControl,
|
SectionCmdControl,
|
||||||
SpeedCmdControl,
|
SpeedCmdControl,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault,
|
|
||||||
TrainInitPlan
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -160,7 +154,7 @@ export default {
|
|||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainInitPlan.doShow(step, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', step);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -168,7 +162,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -176,7 +170,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
<route-hand-control ref="routeHandControl" />
|
<route-hand-control ref="routeHandControl" />
|
||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -27,7 +26,6 @@ import { mapGetters } from 'vuex';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
// import { querySignalStatus } from '@/api/simulation';
|
// import { querySignalStatus } from '@/api/simulation';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -40,8 +38,7 @@ export default {
|
|||||||
RouteCmdControl,
|
RouteCmdControl,
|
||||||
RouteHandControl,
|
RouteHandControl,
|
||||||
RouteDetail,
|
RouteDetail,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -177,7 +174,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -185,7 +182,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
<stand-detain-train-all ref="standDetainTrainAll" />
|
<stand-detain-train-all ref="standDetainTrainAll" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<stand-back-strategy ref="standBackStrategy" />
|
<stand-back-strategy ref="standBackStrategy" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -27,7 +26,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -40,8 +38,7 @@ export default {
|
|||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
StandBackStrategy,
|
StandBackStrategy,
|
||||||
StandStopTime,
|
StandStopTime,
|
||||||
StandDetainTrainAll,
|
StandDetainTrainAll
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -225,7 +222,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -233,7 +230,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
<switch-cmd-control ref="switchCmdControl" />
|
<switch-cmd-control ref="switchCmdControl" />
|
||||||
<speed-cmd-control ref="speedCmdControl" />
|
<speed-cmd-control ref="speedCmdControl" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -20,7 +19,6 @@ import { mapGetters } from 'vuex';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -30,8 +28,7 @@ export default {
|
|||||||
SwitchControl,
|
SwitchControl,
|
||||||
SwitchCmdControl,
|
SwitchCmdControl,
|
||||||
SpeedCmdControl,
|
SpeedCmdControl,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -144,7 +141,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -152,7 +149,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -266,11 +266,11 @@ export const menuOperate = {
|
|||||||
},
|
},
|
||||||
Common: {
|
Common: {
|
||||||
setFault: {
|
setFault: {
|
||||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
|
||||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||||
},
|
},
|
||||||
cancelFault: {
|
cancelFault: {
|
||||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
|
||||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,212 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="ningbo-01__systerm stand-stop-time"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="340px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
|
||||||
<div style="width: 96%;">
|
|
||||||
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
|
|
||||||
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
|
|
||||||
<el-option
|
|
||||||
v-for="tripNum in tripNumberList"
|
|
||||||
:key="tripNum"
|
|
||||||
:label="tripNum"
|
|
||||||
:value="tripNum"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="服 务 号:" label-width="95px" prop="serviceNumber">
|
|
||||||
<el-select v-model="addModel.serviceNumber" filterable>
|
|
||||||
<el-option
|
|
||||||
v-for="serviceNumber in serviceNumberList"
|
|
||||||
:key="serviceNumber"
|
|
||||||
:label="serviceNumber"
|
|
||||||
:value="serviceNumber"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
// name: 'TrainMove',
|
|
||||||
name: 'TrainAddPlan',
|
|
||||||
components: {
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
trainNoList: [],
|
|
||||||
selected: null,
|
|
||||||
tripNumberList: [],
|
|
||||||
serviceNumberList: [],
|
|
||||||
addModel: {
|
|
||||||
serviceNumber: '', // 服务号
|
|
||||||
tripNumber: '' // 车次号
|
|
||||||
},
|
|
||||||
|
|
||||||
rules: {
|
|
||||||
serviceNumber: [
|
|
||||||
{ required: true, message: '请输入服务号', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
tripNumber: [
|
|
||||||
{ required: true, message: '请输入车次号', trigger: 'change' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'trainList',
|
|
||||||
'stationStandList',
|
|
||||||
'trainWindowSectionCode'
|
|
||||||
]),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '创建计划车';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
tripNumberChange(tripNumber) {
|
|
||||||
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
|
|
||||||
this.serviceNumberList = [];
|
|
||||||
if (typeof resp.data == 'string') {
|
|
||||||
this.serviceNumberList.push(resp.data);
|
|
||||||
} else {
|
|
||||||
resp.data.forEach(item => {
|
|
||||||
if (!this.serviceNumberList.includes(item)) {
|
|
||||||
this.serviceNumberList.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (this.serviceNumberList.length === 1) {
|
|
||||||
this.addModel.serviceNumber = this.serviceNumberList[0];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
|
||||||
// if (!this.dialogShow) {
|
|
||||||
|
|
||||||
// }
|
|
||||||
this.addModel = {
|
|
||||||
tripNumber:'',
|
|
||||||
serviceNumber:''
|
|
||||||
};
|
|
||||||
getTripNumberList(this.$route.query.group).then(resp => {
|
|
||||||
this.tripNumberList = [];
|
|
||||||
resp.data.forEach(item => {
|
|
||||||
if (!this.tripNumberList.includes(item)) {
|
|
||||||
this.tripNumberList.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
// this.$messageBox(error.message);
|
|
||||||
});
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
|
||||||
// this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Train.createPlanTrain.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_Train_Init_Plan,
|
|
||||||
param: {
|
|
||||||
serviceNumber: this.addModel.serviceNumber, // 服务号
|
|
||||||
tripNumber: this.addModel.tripNumber // 车次号
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store
|
|
||||||
.dispatch('training/nextNew', operate)
|
|
||||||
.then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.ningbo-01__systerm .el-dialog .base-label {
|
|
||||||
background: rgba(0, 0, 0, x);
|
|
||||||
position: relative;
|
|
||||||
left: -5px;
|
|
||||||
top: -18px;
|
|
||||||
padding: 0 5px;
|
|
||||||
background-color: #F0F0F0;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -6,8 +6,6 @@
|
|||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
<alxe-effective ref="alxeEffective" />
|
<alxe-effective ref="alxeEffective" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<train-add-plan ref="trainAddPlan" />
|
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -23,8 +21,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
import TrainAddPlan from './dialog/trainAddPlan';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -35,9 +31,7 @@ export default {
|
|||||||
SectionUnLock,
|
SectionUnLock,
|
||||||
SpeedLimitControl,
|
SpeedLimitControl,
|
||||||
AlxeEffective,
|
AlxeEffective,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault,
|
|
||||||
TrainAddPlan
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -184,7 +178,7 @@ export default {
|
|||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainAddPlan.doShow(step, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', step);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -259,7 +253,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -267,7 +261,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" />
|
||||||
<router-command ref="routerCommand" />
|
<router-command ref="routerCommand" />
|
||||||
<notice-info ref="noticeInfo" />\
|
<notice-info ref="noticeInfo" />\
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -28,7 +27,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SignalMenu',
|
name: 'SignalMenu',
|
||||||
@ -41,8 +39,7 @@ export default {
|
|||||||
RouteHandControl,
|
RouteHandControl,
|
||||||
RouteDetail,
|
RouteDetail,
|
||||||
RouterCommand,
|
RouterCommand,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -349,7 +346,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -357,7 +354,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
<stand-back-strategy ref="standBackStrategy" />
|
<stand-back-strategy ref="standBackStrategy" />
|
||||||
<StandBulkBuckleTrain ref="standBulkBuckleTrain" />
|
<StandBulkBuckleTrain ref="standBulkBuckleTrain" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -29,7 +28,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationStandMenu',
|
name: 'StationStandMenu',
|
||||||
@ -42,8 +40,7 @@ export default {
|
|||||||
StandRunLevel,
|
StandRunLevel,
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
StandBackStrategy,
|
StandBackStrategy,
|
||||||
StandStopTime,
|
StandStopTime
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -206,7 +203,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -214,7 +211,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
<alxe-effective ref="alxeEffective" />
|
<alxe-effective ref="alxeEffective" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<set-fault ref="setFault" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -18,7 +17,6 @@ import SpeedLimitControl from './dialog/speedLimitControl';
|
|||||||
import AlxeEffective from './dialog/alxeEffective';
|
import AlxeEffective from './dialog/alxeEffective';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
|
||||||
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
@ -33,8 +31,7 @@ export default {
|
|||||||
SwitchUnLock,
|
SwitchUnLock,
|
||||||
SpeedLimitControl,
|
SpeedLimitControl,
|
||||||
AlxeEffective,
|
AlxeEffective,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
SetFault
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -278,7 +275,7 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -286,7 +283,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -266,11 +266,11 @@ export const menuOperate = {
|
|||||||
},
|
},
|
||||||
Common: {
|
Common: {
|
||||||
setFault: {
|
setFault: {
|
||||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
|
||||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||||
},
|
},
|
||||||
cancelFault: {
|
cancelFault: {
|
||||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
|
||||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ export default {
|
|||||||
initMenu() {
|
initMenu() {
|
||||||
this.menuNormal = [];
|
this.menuNormal = [];
|
||||||
this.stationList.forEach(station => {
|
this.stationList.forEach(station => {
|
||||||
if (station.relStationCodeList && station.relStationCodeList.length) {
|
if (station.relStationCodeList && station.ciStation && station.relStationCodeList.length) {
|
||||||
const node = {
|
const node = {
|
||||||
label: station.name,
|
label: station.name,
|
||||||
children: []
|
children: []
|
||||||
|
@ -93,7 +93,7 @@ export default {
|
|||||||
operation: '',
|
operation: '',
|
||||||
planMode: 5,
|
planMode: 5,
|
||||||
headMode: 5,
|
headMode: 5,
|
||||||
fontSize: 16
|
fontSize: 30
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -36,7 +36,7 @@ class Model {
|
|||||||
};
|
};
|
||||||
this['private'][deviceType.Train] = {
|
this['private'][deviceType.Train] = {
|
||||||
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
|
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
|
||||||
nameFontSize: 10 // 字体大小
|
nameFontSize: 30 // 字体大小
|
||||||
};
|
};
|
||||||
this['private'][deviceType.TrainWindow] = {
|
this['private'][deviceType.TrainWindow] = {
|
||||||
trainWindowShow: true
|
trainWindowShow: true
|
||||||
|
@ -144,9 +144,54 @@ export function parser(data, skinCode, showConfig) {
|
|||||||
zrUtil.each(data.splitStationList || [], elem => {
|
zrUtil.each(data.splitStationList || [], elem => {
|
||||||
mapDevice[elem.code] = createDevice(deviceType.SplitStation, elem, propConvert, showConfig);
|
mapDevice[elem.code] = createDevice(deviceType.SplitStation, elem, propConvert, showConfig);
|
||||||
}, this);
|
}, this);
|
||||||
zrUtil.each( data.arrowList || [], elem => {
|
zrUtil.each(data.arrowList || [], elem => {
|
||||||
mapDevice[elem.code] = createDevice(deviceType.Arrow, elem, propConvert, showConfig);
|
mapDevice[elem.code] = createDevice(deviceType.Arrow, elem, propConvert, showConfig);
|
||||||
}, this);
|
}, this);
|
||||||
|
zrUtil.each(data.powerLineList || [], elem => {
|
||||||
|
mapDevice[elem.code] = createDevice(deviceType.Power, elem, propConvert, showConfig);
|
||||||
|
}, this);
|
||||||
|
zrUtil.each(data.switchList || [], elem => {
|
||||||
|
mapDevice[elem.code] = createDevice(deviceType.Switch, elem, propConvert, showConfig);
|
||||||
|
const cnodeSection = mapDevice[mapDevice[elem.code].sectionACode];
|
||||||
|
const lnodeSection = mapDevice[mapDevice[elem.code].sectionBCode];
|
||||||
|
const rnodeSection = mapDevice[mapDevice[elem.code].sectionCCode];
|
||||||
|
|
||||||
|
if (cnodeSection && lnodeSection && rnodeSection) {
|
||||||
|
cnodeSection['switch'] = lnodeSection['switch'] = rnodeSection['switch'] = mapDevice[elem.code];
|
||||||
|
const sectionParent = mapDevice[cnodeSection.parentCode];
|
||||||
|
if (sectionParent) {
|
||||||
|
sectionParent['switch'] = mapDevice[elem.code];
|
||||||
|
}
|
||||||
|
if (cnodeSection.points[0].x == lnodeSection.points[lnodeSection.points.length - 1].x && cnodeSection.points[0].y == lnodeSection.points[lnodeSection.points.length - 1].y) {
|
||||||
|
mapDevice[elem.code].intersection = {
|
||||||
|
x: cnodeSection.points[0].x,
|
||||||
|
y: cnodeSection.points[0].y
|
||||||
|
};
|
||||||
|
mapDevice[elem.code].skew = {
|
||||||
|
x: rnodeSection.points[rnodeSection.points.length - 2].x,
|
||||||
|
y: rnodeSection.points[rnodeSection.points.length - 2].y
|
||||||
|
};
|
||||||
|
} else if (cnodeSection.points[cnodeSection.points.length - 1].x == lnodeSection.points[0].x && cnodeSection.points[cnodeSection.points.length - 1].y == lnodeSection.points[0].y) {
|
||||||
|
mapDevice[elem.code].intersection = {
|
||||||
|
x: cnodeSection.points[cnodeSection.points.length - 1].x,
|
||||||
|
y: cnodeSection.points[cnodeSection.points.length - 1].y
|
||||||
|
};
|
||||||
|
mapDevice[elem.code].skew = {
|
||||||
|
x: rnodeSection.points[1].x,
|
||||||
|
y: rnodeSection.points[1].y
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const section = mapDevice[cnodeSection.parentCode];
|
||||||
|
if (section) {
|
||||||
|
mapDevice[elem.code].sectionName = section.name;
|
||||||
|
mapDevice[elem.code].sectionParentCode = section.code;
|
||||||
|
section['relSwitchCode'] = elem.code;
|
||||||
|
}
|
||||||
|
|
||||||
|
rnodeSection['layer'] = -1;
|
||||||
|
}
|
||||||
|
}, this);
|
||||||
zrUtil.each(data.indicatorLightList || [], elem => {
|
zrUtil.each(data.indicatorLightList || [], elem => {
|
||||||
switch (elem.type) {
|
switch (elem.type) {
|
||||||
case 'AtsControl':
|
case 'AtsControl':
|
||||||
@ -202,6 +247,7 @@ export function parser(data, skinCode, showConfig) {
|
|||||||
break;
|
break;
|
||||||
case 'SwitchFault':
|
case 'SwitchFault':
|
||||||
mapDevice[elem.code] = createDevice(deviceType.SwitchFault, elem, propConvert, showConfig);
|
mapDevice[elem.code] = createDevice(deviceType.SwitchFault, elem, propConvert, showConfig);
|
||||||
|
mapDevice[elem.switchCode].switchFaultCode = elem.code; // 道岔数据上关联道岔故障表示灯(需保证该数据在switchList之后处理)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
@ -215,49 +261,6 @@ export function parser(data, skinCode, showConfig) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
zrUtil.each(data.switchList || [], elem => {
|
|
||||||
mapDevice[elem.code] = createDevice(deviceType.Switch, elem, propConvert, showConfig);
|
|
||||||
const cnodeSection = mapDevice[mapDevice[elem.code].sectionACode];
|
|
||||||
const lnodeSection = mapDevice[mapDevice[elem.code].sectionBCode];
|
|
||||||
const rnodeSection = mapDevice[mapDevice[elem.code].sectionCCode];
|
|
||||||
|
|
||||||
if (cnodeSection && lnodeSection && rnodeSection) {
|
|
||||||
cnodeSection['switch'] = lnodeSection['switch'] = rnodeSection['switch'] = mapDevice[elem.code];
|
|
||||||
const sectionParent = mapDevice[cnodeSection.parentCode];
|
|
||||||
if (sectionParent) {
|
|
||||||
sectionParent['switch'] = mapDevice[elem.code];
|
|
||||||
}
|
|
||||||
if (cnodeSection.points[0].x == lnodeSection.points[lnodeSection.points.length - 1].x && cnodeSection.points[0].y == lnodeSection.points[lnodeSection.points.length - 1].y) {
|
|
||||||
mapDevice[elem.code].intersection = {
|
|
||||||
x: cnodeSection.points[0].x,
|
|
||||||
y: cnodeSection.points[0].y
|
|
||||||
};
|
|
||||||
mapDevice[elem.code].skew = {
|
|
||||||
x: rnodeSection.points[rnodeSection.points.length - 2].x,
|
|
||||||
y: rnodeSection.points[rnodeSection.points.length - 2].y
|
|
||||||
};
|
|
||||||
} else if (cnodeSection.points[cnodeSection.points.length - 1].x == lnodeSection.points[0].x && cnodeSection.points[cnodeSection.points.length - 1].y == lnodeSection.points[0].y) {
|
|
||||||
mapDevice[elem.code].intersection = {
|
|
||||||
x: cnodeSection.points[cnodeSection.points.length - 1].x,
|
|
||||||
y: cnodeSection.points[cnodeSection.points.length - 1].y
|
|
||||||
};
|
|
||||||
mapDevice[elem.code].skew = {
|
|
||||||
x: rnodeSection.points[1].x,
|
|
||||||
y: rnodeSection.points[1].y
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const section = mapDevice[cnodeSection.parentCode];
|
|
||||||
if (section) {
|
|
||||||
mapDevice[elem.code].sectionName = section.name;
|
|
||||||
mapDevice[elem.code].sectionParentCode = section.code;
|
|
||||||
section['relSwitchCode'] = elem.code;
|
|
||||||
}
|
|
||||||
|
|
||||||
rnodeSection['layer'] = -1;
|
|
||||||
}
|
|
||||||
}, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return mapDevice;
|
return mapDevice;
|
||||||
@ -326,6 +329,7 @@ export function updateMapData(state, model) {
|
|||||||
case deviceType.SplitStation: updateForList(model, state, 'splitStationList'); break;
|
case deviceType.SplitStation: updateForList(model, state, 'splitStationList'); break;
|
||||||
case deviceType.SwitchFault: updateForList(model, state, 'indicatorLightList'); break;
|
case deviceType.SwitchFault: updateForList(model, state, 'indicatorLightList'); break;
|
||||||
case deviceType.Arrow: updateForList(model, state, 'arrowList'); break;
|
case deviceType.Arrow: updateForList(model, state, 'arrowList'); break;
|
||||||
|
case deviceType.Power: updateForList(model, state, 'powerLineList'); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,6 +134,7 @@ const CompetitionDetail = () => import('@/views/jsxt/competition/examDetail');
|
|||||||
const CompetitionManage = () => import('@/views/jsxt/competition/index');
|
const CompetitionManage = () => import('@/views/jsxt/competition/index');
|
||||||
const CompetitionHome = () => import('@/views/jsxt/competition/home');
|
const CompetitionHome = () => import('@/views/jsxt/competition/home');
|
||||||
const Refereedetail = () => import('@/views/jsxt/competition/theory/quiz/index');
|
const Refereedetail = () => import('@/views/jsxt/competition/theory/quiz/index');
|
||||||
|
const RefereeResult = () => import('@/views/jsxt/competition/theory/result');
|
||||||
const JsxtExamResult = () => import('@/views/jsxt/competition/result');
|
const JsxtExamResult = () => import('@/views/jsxt/competition/result');
|
||||||
const JsxtApply = () => import('@/views/jsxt/apply/index');
|
const JsxtApply = () => import('@/views/jsxt/apply/index');
|
||||||
// const theoryManage = () => import('@/views/jsxt/competition/theory/index');
|
// const theoryManage = () => import('@/views/jsxt/competition/theory/index');
|
||||||
@ -1042,10 +1043,15 @@ export const JSXT = [
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/jsxt/theory/detail/:id',
|
path: '/jsxt/theory/detail',
|
||||||
component: Refereedetail,
|
component: Refereedetail,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/jsxt/theory/result', // 考试结果页面
|
||||||
|
component: RefereeResult,
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
// 裁判系统
|
// 裁判系统
|
||||||
{
|
{
|
||||||
path: '/refereeJsxt',
|
path: '/refereeJsxt',
|
||||||
|
@ -32,7 +32,7 @@ export const loginInfo = { // 页面title & 退出登录跳转路径
|
|||||||
loginPath: '/designgzb/login'
|
loginPath: '/designgzb/login'
|
||||||
},
|
},
|
||||||
hyd: {
|
hyd: {
|
||||||
title: '城市轨道交通实训平台',
|
title: '城市轨道交通综合行车模拟仿真系统',
|
||||||
loginPath: '/login'
|
loginPath: '/login'
|
||||||
},
|
},
|
||||||
designhyd: {
|
designhyd: {
|
||||||
|
@ -342,6 +342,13 @@ const map = {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
powerLineList: (state) => {
|
||||||
|
if (state.map) {
|
||||||
|
return state.map.powerLineList || [];
|
||||||
|
} else {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
},
|
||||||
tempSpeedLimitList: (state) => {
|
tempSpeedLimitList: (state) => {
|
||||||
if (state.map) {
|
if (state.map) {
|
||||||
return state.map.tempSpeedLimitList;
|
return state.map.tempSpeedLimitList;
|
||||||
|
@ -29,6 +29,15 @@ function handle(state, data) {
|
|||||||
case 'Simulation_Script_Tip': // 仿真-聊天界面用户进出仿真消息
|
case 'Simulation_Script_Tip': // 仿真-聊天界面用户进出仿真消息
|
||||||
handleSimulationScriptTipInfo(state, msg); // 用户进出仿真消息
|
handleSimulationScriptTipInfo(state, msg); // 用户进出仿真消息
|
||||||
break;
|
break;
|
||||||
|
case 'Simulation_Start_Conversation': // 综合演练仿真-聊天界面用户邀请其他人加入群聊
|
||||||
|
state.inviteOtherIntoChat = msg;
|
||||||
|
break;
|
||||||
|
case 'Simulation_Accept_Conversation': // 综合演练仿真-聊天界面用户接受被邀请
|
||||||
|
state.acceptInviteChat = msg;
|
||||||
|
break;
|
||||||
|
case 'Simulation_Exist_Conversation': // 综合演练仿真-聊天界面用户退出群聊发送消息
|
||||||
|
state.quitCoversition = msg;
|
||||||
|
break;
|
||||||
case 'Competition_Practical': // 竞赛裁判系统裁判员开始考试推送消息
|
case 'Competition_Practical': // 竞赛裁判系统裁判员开始考试推送消息
|
||||||
state.competitionStart++; // 竞赛裁判系统裁判员开始考试推送消息
|
state.competitionStart++; // 竞赛裁判系统裁判员开始考试推送消息
|
||||||
break;
|
break;
|
||||||
@ -160,9 +169,7 @@ function handleSimulationInfo(state, data) {
|
|||||||
member:data.member,
|
member:data.member,
|
||||||
memberOnline:data.member.online,
|
memberOnline:data.member.online,
|
||||||
chatTime: data.chatTime,
|
chatTime: data.chatTime,
|
||||||
targetOnline:data.targetMember ? data.targetMember.online : null,
|
targetUser:data.targetMember ? data.targetMember : 'All',
|
||||||
targetName:data.targetMember ? data.targetMember : 'All',
|
|
||||||
targetRole:data.targetMember ? data.targetMember.role : null,
|
|
||||||
all: data.all,
|
all: data.all,
|
||||||
date: +new Date(`${myDate1} ${chatTime}`)
|
date: +new Date(`${myDate1} ${chatTime}`)
|
||||||
};
|
};
|
||||||
@ -213,7 +220,10 @@ const socket = {
|
|||||||
simulationStart: '', // 仿真-开始消息
|
simulationStart: '', // 仿真-开始消息
|
||||||
simulationOver:0, // 退出仿真推送消息
|
simulationOver:0, // 退出仿真推送消息
|
||||||
simulationReset: '', // 仿真-异常消息
|
simulationReset: '', // 仿真-异常消息
|
||||||
simulationText: {}, // 仿真-用户交互消息(聊天/命令)
|
simulationText: {}, // 仿真-用户交互消息(聊天/命令),
|
||||||
|
inviteOtherIntoChat:{}, // 综合演练仿真-聊天界面用户邀请其他人加入群聊推送信息
|
||||||
|
acceptInviteChat:{}, // 综合演练仿真-聊天界面用户接受聊天邀请,
|
||||||
|
quitCoversition:{}, // 综合演练仿真-聊天界面用户退出群聊推送消息,
|
||||||
// coversitionList:{}, // 历史仿真-用户消息列表
|
// coversitionList:{}, // 历史仿真-用户消息列表
|
||||||
|
|
||||||
message: {}, // 仿真聊天
|
message: {}, // 仿真聊天
|
||||||
|
@ -2,15 +2,72 @@
|
|||||||
<div class="emergency_release">
|
<div class="emergency_release">
|
||||||
<div class="emergency_release_header">
|
<div class="emergency_release_header">
|
||||||
<div class="emergency_header_text">中心PIS紧急信息一览</div>
|
<div class="emergency_header_text">中心PIS紧急信息一览</div>
|
||||||
|
<el-table :data="tableData" :header-cell-style="headerCellStyle" :cell-style="cellStyle" :height="'60%'" style="width: 94%; position: relative;left: 3%;">
|
||||||
|
<el-table-column prop="time" label="时间" width="150" />
|
||||||
|
<el-table-column prop="description" label="信息描述" />
|
||||||
|
<el-table-column prop="level" label="等级" />
|
||||||
|
</el-table>
|
||||||
|
<div style="margin-top: 10px;width: 100%;">
|
||||||
|
<div style="width: 75%;background: #FFF;padding: 2px;display: inline-block;vertical-align:top;margin-left: 3%">
|
||||||
|
<div style="width: 100%;text-align: center;font-size: 13px;padding-top:5px;">显示内容</div>
|
||||||
|
<div style="width:100%; height: 100px; border: 1px solid #000;" />
|
||||||
|
</div>
|
||||||
|
<div style="width: 15%;background: #939FAC; display: inline-block;margin-left: 2%;">
|
||||||
|
<div class="emergency_select_button">区域详细</div>
|
||||||
|
<div style="width: 100%;text-align: center;color: #FFF;font-size: 13px;background: #121A86;height: 30px;line-height: 30px;">紧急信息清除</div>
|
||||||
|
<div class="emergency_select_button">清除</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
name:'EmergencyRelease',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableData: [],
|
||||||
|
headerCellStyle: {background: '#121A86', height: '25px', color: '#FFF'},
|
||||||
|
cellStyle: {height:'25px'}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.emergency_release{padding:20px;}
|
.emergency_release{padding:20px;height: 100%;}
|
||||||
|
.emergency_release_header{height: 100%;}
|
||||||
.emergency_header_text{margin-top:10px;text-align: center;color: #9af1ec;font-size: 18px;padding-bottom: 10px;}
|
.emergency_header_text{margin-top:10px;text-align: center;color: #9af1ec;font-size: 18px;padding-bottom: 10px;}
|
||||||
|
.emergency_select_button {
|
||||||
|
text-align: center;
|
||||||
|
width: 90px;
|
||||||
|
height: 30px;
|
||||||
|
background: #A9A9A9;
|
||||||
|
border-top: 2px solid #FFF;
|
||||||
|
border-left: 2px solid #FFF;
|
||||||
|
border-right: 2px solid #898888;
|
||||||
|
border-bottom: 2px solid #898888;
|
||||||
|
margin: 10px auto 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 30px;
|
||||||
|
cursor:pointer;
|
||||||
|
-webkit-user-select:none;
|
||||||
|
-moz-user-select:none;
|
||||||
|
-ms-user-select:none;
|
||||||
|
user-select:none;
|
||||||
|
}
|
||||||
|
.emergency_select_button:active {
|
||||||
|
border-top: 2px solid #898888;
|
||||||
|
border-left: 2px solid #898888;
|
||||||
|
border-right: 2px solid #FFF;
|
||||||
|
border-bottom: 2px solid #FFF;
|
||||||
|
}
|
||||||
|
/deep/
|
||||||
|
.el-table th{
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
/deep/
|
||||||
|
.el-table td{
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div class="lcdControl_title">LCD控制屏</div>
|
<div class="lcdControl_title">LCD控制屏</div>
|
||||||
<div class="area_select" style="margin-top: 110px;">
|
<div class="area_select" style="margin-top: 110px;">
|
||||||
<div class="area_select_title">特定区域</div>
|
<div class="area_select_title">特定区域</div>
|
||||||
<div class="area_select_button">全线</div>
|
<div class="area_select_button" @click="selectedAllArea">全线</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="area_select" style="margin-top: 200px;">
|
<div class="area_select" style="margin-top: 200px;">
|
||||||
<div>
|
<div>
|
||||||
@ -15,21 +15,28 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="lcd_content_box">
|
<div class="lcd_content_box">
|
||||||
<div style="display: inline-block;">
|
<div style="display: inline-block;position:absolute;width: 50px;z-index: 2;background: #45607B;">
|
||||||
<div class="lcd_content_box_left_title">车站</div>
|
<div class="lcd_content_box_left_title">车站</div>
|
||||||
<div class="lcd_content_box_left_title">选择</div>
|
<div class="lcd_content_box_left_title">选择</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-for="(station, index) in stationList" :key="index" style="display: inline-block;text-align: center;">
|
<div style="width: 100%; overflow-x: auto;white-space: nowrap;height: 100%;">
|
||||||
<div class="each_station_info">{{ station }}</div>
|
<div style="position: relative; left: 50px;">
|
||||||
<div class="button_default_content">
|
<div v-for="(station, index) in stationList" :key="index" style="display: inline-block;text-align: center;">
|
||||||
<div class="button_default" :style="{background:selectedAreaList.includes(station.stationName + '-' + index)?'#2EFF74':'#CDCDCD'}" />
|
<div class="each_station_info" @click="selectedArea(station)">{{ station }}</div>
|
||||||
|
<div class="button_default_content">
|
||||||
|
<div class="button_default" :style="{background:selectedAreaList.includes(station)?'#2EFF74':'#CDCDCD'}" @click="selectedArea(station)" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { getByGroupStationList } from '@/api/jmap/map';
|
||||||
export default {
|
export default {
|
||||||
|
name:'LcdControl',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
columns: ['车站', '选择'],
|
columns: ['车站', '选择'],
|
||||||
@ -37,6 +44,35 @@ export default {
|
|||||||
lcdSwitch: true,
|
lcdSwitch: true,
|
||||||
selectedAreaList:[]
|
selectedAreaList:[]
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
async created () {
|
||||||
|
// 请求当前线路车站列表
|
||||||
|
try {
|
||||||
|
const res = await getByGroupStationList(this.$route.query.group);
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.stationList = [];
|
||||||
|
res.data.forEach(station => {
|
||||||
|
if (!station.depot) {
|
||||||
|
this.stationList.push(station.name);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.$message.error('获取车站列表失败!');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
selectedArea(station) {
|
||||||
|
const index = this.selectedAreaList.indexOf(station);
|
||||||
|
if (index < 0) {
|
||||||
|
this.selectedAreaList.push(station);
|
||||||
|
} else {
|
||||||
|
this.selectedAreaList.splice(index, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectedAllArea() {
|
||||||
|
this.selectedAreaList = [...this.stationList];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -79,9 +115,19 @@ export default {
|
|||||||
margin: 5px 12px 10px;
|
margin: 5px 12px 10px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
|
cursor:pointer;
|
||||||
|
-webkit-user-select:none;
|
||||||
|
-moz-user-select:none;
|
||||||
|
-ms-user-select:none;
|
||||||
|
user-select:none;
|
||||||
|
}
|
||||||
|
.area_select_button:active {
|
||||||
|
border-top: 2px solid #898888;
|
||||||
|
border-left: 2px solid #898888;
|
||||||
|
border-right: 2px solid #FFF;
|
||||||
|
border-bottom: 2px solid #FFF;
|
||||||
}
|
}
|
||||||
.each_station_info{
|
.each_station_info{
|
||||||
/*display: inline-block;*/
|
|
||||||
vertical-align:top;
|
vertical-align:top;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
padding: 2px 2px;
|
padding: 2px 2px;
|
||||||
@ -91,6 +137,11 @@ export default {
|
|||||||
border-right: 2px solid #898888;
|
border-right: 2px solid #898888;
|
||||||
border-bottom: 2px solid #898888;
|
border-bottom: 2px solid #898888;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
cursor:pointer;
|
||||||
|
-webkit-user-select:none;
|
||||||
|
-moz-user-select:none;
|
||||||
|
-ms-user-select:none;
|
||||||
|
user-select:none;
|
||||||
}
|
}
|
||||||
.lcd_content_box{
|
.lcd_content_box{
|
||||||
margin-top: 110px;
|
margin-top: 110px;
|
||||||
@ -103,14 +154,12 @@ export default {
|
|||||||
border-right: 3px solid #fff;
|
border-right: 3px solid #fff;
|
||||||
border-bottom: 3px solid #fff;
|
border-bottom: 3px solid #fff;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
padding-left: 10px;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
}
|
||||||
.lcd_content_box_left_title{
|
.lcd_content_box_left_title{
|
||||||
vertical-align:top;
|
vertical-align:top;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #CBFFFF;
|
color: #CBFFFF;
|
||||||
padding: 10px 10px 5px;
|
padding: 5px 10px 10px;
|
||||||
}
|
}
|
||||||
.button_default_content{
|
.button_default_content{
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
|
@ -103,24 +103,29 @@ export default {
|
|||||||
},
|
},
|
||||||
async created () {
|
async created () {
|
||||||
// 请求当前线路车站列表
|
// 请求当前线路车站列表
|
||||||
const res = await getByGroupStationList(this.$route.query.group);
|
try {
|
||||||
if (res.code == 200) {
|
const res = await getByGroupStationList(this.$route.query.group);
|
||||||
this.stationList = [];
|
if (res.code == 200) {
|
||||||
res.data.forEach(station => {
|
this.stationList = [];
|
||||||
if (!station.depot) {
|
res.data.forEach(station => {
|
||||||
const param = {
|
if (!station.depot) {
|
||||||
stationName: station.name,
|
const param = {
|
||||||
children:[
|
stationName: station.name,
|
||||||
{status:'none'}, {status:'default'},
|
children:[
|
||||||
{status:'default'}, {status:'default'},
|
{status:'none'}, {status:'default'},
|
||||||
{status:'none'}, {status:'none'},
|
{status:'default'}, {status:'default'},
|
||||||
{status:'none'}, {status:'default'}
|
{status:'none'}, {status:'none'},
|
||||||
]
|
{status:'none'}, {status:'default'}
|
||||||
};
|
]
|
||||||
this.stationList.push(param);
|
};
|
||||||
}
|
this.stationList.push(param);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.$message.error('获取车站列表失败!');
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
showInfoBrroadcast() {
|
showInfoBrroadcast() {
|
||||||
|
@ -160,7 +160,8 @@ export default {
|
|||||||
this.resultFlag = false;
|
this.resultFlag = false;
|
||||||
const res = await getRaceUserById(this.$route.query.raceId);
|
const res = await getRaceUserById(this.$route.query.raceId);
|
||||||
if (this.$route.query.type == 'theory' && (res.data.status == 4 || res.data.status == 5)) {
|
if (this.$route.query.type == 'theory' && (res.data.status == 4 || res.data.status == 5)) {
|
||||||
this.$router.replace({ path: `/jsxt/result`, query: { type: 'theory', raceId:this.$route.query.raceId } });
|
// this.$router.replace({ path: `/jsxt/result`, query: { type: 'theory', raceId:this.$route.query.raceId } });
|
||||||
|
this.$router.replace({ path: `/jsxt/theory/result?raceId=${this.$route.query.raceId}` });
|
||||||
} else if (this.$route.query.type == 'operation' && (res.data.status == 4 || res.data.status == 6)) {
|
} else if (this.$route.query.type == 'operation' && (res.data.status == 4 || res.data.status == 6)) {
|
||||||
this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, type: 'operate', raceId:this.$route.query.raceId } });
|
this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, type: 'operate', raceId:this.$route.query.raceId } });
|
||||||
} else {
|
} else {
|
||||||
@ -171,7 +172,7 @@ export default {
|
|||||||
if (this.$route.query.type == 'theory') {
|
if (this.$route.query.type == 'theory') {
|
||||||
getTheoryQuestion(this.$route.query.raceId).then((resp)=>{
|
getTheoryQuestion(this.$route.query.raceId).then((resp)=>{
|
||||||
if (resp.data) {
|
if (resp.data) {
|
||||||
this.$router.push(`/jsxt/theory/detail/${this.$route.query.mapId}?raceId=${this.$route.query.raceId}`);
|
this.$router.push(`/jsxt/theory/detail?raceId=${this.$route.query.raceId}`);
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox('试卷还没被加载');
|
this.$messageBox('试卷还没被加载');
|
||||||
}
|
}
|
||||||
@ -182,7 +183,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
getPracticalQuestion(this.$route.query.raceId).then((responese)=>{
|
getPracticalQuestion(this.$route.query.raceId).then((responese)=>{
|
||||||
if (responese.data) {
|
if (responese.data) {
|
||||||
participantCreatTrainingRoom(this.$route.query.raceId, {mapId: 41, prdType: '02'}).then(resp => {
|
participantCreatTrainingRoom(this.$route.query.raceId, {mapId: 41, prdType: '03'}).then(resp => {
|
||||||
const query = { lineCode: '11', mapId: '41', group: resp.data, raceId: this.$route.query.raceId};
|
const query = { lineCode: '11', mapId: '41', group: resp.data, raceId: this.$route.query.raceId};
|
||||||
this.$router.replace({ path: `/jointTrainingNew`, query: query});
|
this.$router.replace({ path: `/jointTrainingNew`, query: query});
|
||||||
});
|
});
|
||||||
|
@ -13,7 +13,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form> -->
|
</el-form> -->
|
||||||
<el-table :data="tableData" border style="width: 100%; min-height: 200px;" :summary-method="getSummaries" show-summary :span-method="objectSpanMethod">
|
<el-table :data="tableData" border style="width: 100%; min-height: 200px;" :summary-method="getSummaries" show-summary :span-method="objectSpanMethod">
|
||||||
<el-table-column prop="title" label="题目" />
|
<el-table-column prop="title" label="题目">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div v-html="scope.row.title" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>>
|
||||||
<el-table-column prop="score" label="分值" />
|
<el-table-column prop="score" label="分值" />
|
||||||
<el-table-column prop="goal" label="得分" />
|
<el-table-column prop="goal" label="得分" />
|
||||||
<el-table-column v-if="this.$route.query.type ==='theory'" prop="correctAnswer" label="答题结果" />
|
<el-table-column v-if="this.$route.query.type ==='theory'" prop="correctAnswer" label="答题结果" />
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="">
|
|
||||||
理论首页
|
|
||||||
<el-button @click="startExam">开始考试</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: '',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
mapId: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.mapId = this.$route.params.id;
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
startExam() {
|
|
||||||
this.$router.push(`/jsxt/theory/detail/${this.mapId}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
|
|
||||||
</style>
|
|
116
src/views/jsxt/competition/theory/question.vue
Normal file
116
src/views/jsxt/competition/theory/question.vue
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
<template>
|
||||||
|
<div class="question">
|
||||||
|
<div class="ql-editor" v-html="appendIndex($escapeHTML(`${option.topic}`), $vnode.key, option)" />
|
||||||
|
<template v-if="checkType(option, 'judge')">
|
||||||
|
<el-radio-group v-model="answer" disabled :class="{'select-box': option.rightAnswer != option.answer}" @change="onChnage">
|
||||||
|
<el-radio v-for="(el,i) in option.optionList" :key="i" :label="$str2number(el.id)" style="display: inline">
|
||||||
|
<span>{{ el.content }}</span>
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="checkType(option, 'select')">
|
||||||
|
<el-radio-group v-model="answer" disabled :class="{'select-box': option.rightAnswer != option.answer}" @change="onChnage">
|
||||||
|
<el-radio v-for="(el,i) in option.optionList" :key="i" :label="$str2number(el.id)" style="display: block">
|
||||||
|
<span>{{ $asc2chart(i+65) }}. </span>
|
||||||
|
<div class="ql-editor" style="display: inline; padding: 0" v-html="$escapeHTML(el.content)" />
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
option: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
answer: 0
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
value(val) {
|
||||||
|
this.changeValue();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.changeValue();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
changeValue() {
|
||||||
|
this.answer = parseInt(this.value);
|
||||||
|
},
|
||||||
|
checkType(option, type) {
|
||||||
|
return option.type == type;
|
||||||
|
},
|
||||||
|
appendIndex(str, index, option) {
|
||||||
|
let result = '';
|
||||||
|
const i = option.optionList.findIndex(ele => ele.correct);
|
||||||
|
if (option.type === 'select') {
|
||||||
|
if (option.answer == option.optionList[i].id) {
|
||||||
|
result = `<span style="color: green;margin-left: 10px;">(正确 得分: ${option.score})</span>`;
|
||||||
|
} else {
|
||||||
|
result = `<span style="color: red;margin-left: 10px;">(错误 正确答案: ${this.$asc2chart(i + 65)})</span>`;
|
||||||
|
}
|
||||||
|
} else if (option.type === 'judge') {
|
||||||
|
if (option.answer == option.optionList[i].id) {
|
||||||
|
result = `<span style="color: green;margin-left: 10px;">(正确 得分: ${option.score})</span>`;
|
||||||
|
} else {
|
||||||
|
result = `<span style="color: red;margin-left: 10px;">(错误 正确答案: ${option.optionList[i].content})</span>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$set(option, 'rightAnswer', option.optionList[i].id);
|
||||||
|
// 判断是否选择正确 来显示不同内容
|
||||||
|
return `${index + 1}. ${str} ${result}`;
|
||||||
|
},
|
||||||
|
onChnage(e) {
|
||||||
|
const answer = `${e}`;
|
||||||
|
this.$emit('input', answer);
|
||||||
|
this.$emit('save', {userExamQuestionId: this.option.id, answer: answer});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.rich-text {
|
||||||
|
padding: 0;
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.question {
|
||||||
|
/deep/ {
|
||||||
|
.ql-editor {
|
||||||
|
line-height: 26px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-radio {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-radio__label {
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-radio-group .is-disabled .el-radio__label{
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-box.el-radio-group .is-checked.is-disabled .el-radio__label{
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -14,6 +14,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer class="quiz__container-footer layer-center" @click="returnTop">
|
<el-footer class="quiz__container-footer layer-center" @click="returnTop">
|
||||||
|
<div style="display: inline-block;position: relative;bottom: 20px;height: 40px;line-height: 40px;float: left;color:#F00;font-size: 12px;">温馨提示:考试过程中请退出或关闭本页面不会终止计时!</div>
|
||||||
|
<div style="display: inline-block;position: relative;bottom: 20px;height: 40px;line-height: 40px;margin-right: 10px;font-weight:bold;">{{ '剩余时间:'+countdownTime }}</div>
|
||||||
<el-button-group class="buttons">
|
<el-button-group class="buttons">
|
||||||
<el-button v-loading="loading" type="primary" @click="commit">提 交</el-button>
|
<el-button v-loading="loading" type="primary" @click="commit">提 交</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
@ -26,7 +28,8 @@
|
|||||||
// import { commitExam, getExamInfo, getUserExam, saveExamAnswer } from '@/api/exam.js';
|
// import { commitExam, getExamInfo, getUserExam, saveExamAnswer } from '@/api/exam.js';
|
||||||
// import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
// import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||||
import Question from './question';
|
import Question from './question';
|
||||||
import { postCompetitionTheory, getTheoryQuestion } from '@/api/competition';
|
import localStore from 'storejs';
|
||||||
|
import { postCompetitionTheory, getTheoryQuestion, quitCurrentRace } from '@/api/competition';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -49,7 +52,10 @@ export default {
|
|||||||
passScore: 10
|
passScore: 10
|
||||||
},
|
},
|
||||||
examQuestions: [],
|
examQuestions: [],
|
||||||
theoryAnswers: []
|
theoryAnswersMap: {},
|
||||||
|
countdownTime: '00:00:00',
|
||||||
|
theoryExamTime: 0,
|
||||||
|
countdown: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -86,15 +92,51 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
quitCurrentRace(this.$route.query.raceId, {}).then(res=>{
|
||||||
|
});
|
||||||
|
if (this.countdown) {
|
||||||
|
clearInterval(this.countdown);
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
this.theoryAnswers = [];
|
// this.theoryAnswers = [];
|
||||||
|
this.theoryAnswersMap = {};
|
||||||
getTheoryQuestion(this.$route.query.raceId).then((resp)=>{
|
getTheoryQuestion(this.$route.query.raceId).then((resp)=>{
|
||||||
|
const storeAnswersKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'theoryAnswers';
|
||||||
|
const storeAnswers = localStore.get(storeAnswersKey);
|
||||||
|
if (storeAnswers) {
|
||||||
|
this.theoryAnswersMap = storeAnswers;
|
||||||
|
}
|
||||||
if (resp.data) {
|
if (resp.data) {
|
||||||
this.examQuestions = resp.data.questions.map((el, i) => {
|
this.examQuestions = resp.data.questions.map((el, i) => {
|
||||||
el.index = i;
|
el.index = i;
|
||||||
|
el.answer = this.theoryAnswersMap[el.id];
|
||||||
return el;
|
return el;
|
||||||
});
|
});
|
||||||
|
this.theoryExamTime = resp.data.theoryExamTime * 60;
|
||||||
|
this.countdownTime = this.computationTime(this.theoryExamTime);
|
||||||
|
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'theory';
|
||||||
|
const startTime = localStore.get(storeKey);
|
||||||
|
|
||||||
|
if (startTime) {
|
||||||
|
const dt = new Date().getTime() - startTime;
|
||||||
|
this.theoryExamTime = resp.data.theoryExamTime * 60 - Math.floor(dt / 1000);
|
||||||
|
} else {
|
||||||
|
const storeValue = new Date().getTime();
|
||||||
|
localStore.set(storeKey, storeValue);
|
||||||
|
}
|
||||||
|
this.countdown = setInterval(() => {
|
||||||
|
if (this.theoryExamTime <= 0) {
|
||||||
|
if (this.countdown) {
|
||||||
|
clearInterval(this.countdown);
|
||||||
|
}
|
||||||
|
this.commit();
|
||||||
|
}
|
||||||
|
this.theoryExamTime--;
|
||||||
|
this.countdownTime = this.computationTime(this.theoryExamTime);
|
||||||
|
}, 1000);
|
||||||
}
|
}
|
||||||
}).catch(error => { this.$message.error(`加载考试详情失败:${error.message}`); });
|
}).catch(error => { this.$message.error(`加载考试详情失败:${error.message}`); });
|
||||||
},
|
},
|
||||||
@ -120,7 +162,7 @@ export default {
|
|||||||
if (!el.answer) { isFinish = false; }
|
if (!el.answer) { isFinish = false; }
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isFinish) {
|
if (isFinish || this.theoryExamTime <= 0) {
|
||||||
this.doEnd();
|
this.doEnd();
|
||||||
} else {
|
} else {
|
||||||
this.$confirm('存在试题未完成,是否继续?', '提 示', {
|
this.$confirm('存在试题未完成,是否继续?', '提 示', {
|
||||||
@ -133,20 +175,44 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
doEnd() {
|
doEnd() {
|
||||||
|
const theoryAnswers = [];
|
||||||
|
for (const key in this.theoryAnswersMap) {
|
||||||
|
theoryAnswers.push({questionId: key, answerOptionId: this.theoryAnswersMap[key]});
|
||||||
|
}
|
||||||
const params = {
|
const params = {
|
||||||
competitionId: this.$route.query.raceId,
|
competitionId: this.$route.query.raceId,
|
||||||
theoryAnswers: this.theoryAnswers
|
theoryAnswers: theoryAnswers
|
||||||
};
|
};
|
||||||
postCompetitionTheory(params).then(()=>{
|
postCompetitionTheory(params).then(()=>{
|
||||||
this.$router.push({ path: `/jsxt/result`, query: { type: 'theory', raceId:this.$route.query.raceId } });
|
this.$router.push({ path: `/jsxt/theory/result?raceId=${this.$route.query.raceId}` });
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onSave(data) {
|
onSave(data) {
|
||||||
// console.log(data, '问答题');
|
// this.theoryAnswers.push({
|
||||||
this.theoryAnswers.push({
|
// answerOptionId: data.answer,
|
||||||
answerOptionId: data.answer,
|
// questionId: data.userExamQuestionId
|
||||||
questionId: data.userExamQuestionId
|
// });
|
||||||
});
|
this.theoryAnswersMap[data.userExamQuestionId] = data.answer;
|
||||||
|
// console.log(data, '问答题', this.theoryAnswers, this.theoryAnswersMap);
|
||||||
|
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'theoryAnswers';
|
||||||
|
localStore.set(storeKey, this.theoryAnswersMap);
|
||||||
|
|
||||||
|
},
|
||||||
|
computationTime(time) {
|
||||||
|
let hours = Math.floor(time / 3600);
|
||||||
|
const newTime = time % 3600;
|
||||||
|
let minutes = Math.floor(newTime / 60) + '';
|
||||||
|
let seconds = newTime % 60;
|
||||||
|
if (hours < 10) {
|
||||||
|
hours = '0' + hours;
|
||||||
|
}
|
||||||
|
if (minutes < 10) {
|
||||||
|
minutes = '0' + minutes;
|
||||||
|
}
|
||||||
|
if (seconds < 10) {
|
||||||
|
seconds = '0' + seconds;
|
||||||
|
}
|
||||||
|
return hours + ':' + minutes + ':' + seconds;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
200
src/views/jsxt/competition/theory/result.vue
Normal file
200
src/views/jsxt/competition/theory/result.vue
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
<template>
|
||||||
|
<el-container class="quiz">
|
||||||
|
<el-container class="quiz__container">
|
||||||
|
<el-header class="quiz__container-header layer-center">
|
||||||
|
<div class="titles">考试结果</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="quiz__container-main layer-center">
|
||||||
|
<div v-for="(el,i) in sortedList" :id="'anchor__lst-'+i" :key="i" class="section">
|
||||||
|
<template v-if="el.children.length">
|
||||||
|
<div class="caption">{{ index2UnicodeList[i] }}、{{ el.title }}</div>
|
||||||
|
<question v-for="(item,j) in el.children" :id="'anchor__lst-'+item.type+'-'+item.index" :key="j" v-model="item.answer" class="context" :option="item" />
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<div style="padding-left: 20px;margin-top: 20px;">
|
||||||
|
<span>考试总分: </span>
|
||||||
|
<span style="font-size: 20px">{{ totalScore }}分</span>
|
||||||
|
</div>
|
||||||
|
</el-main>
|
||||||
|
<el-footer class="quiz__container-footer layer-center" @click="returnTop">
|
||||||
|
<el-button-group class="buttons">
|
||||||
|
<el-button v-loading="loading" type="primary" @click="commit">返回首页</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</el-footer>
|
||||||
|
</el-container>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// import { commitExam, getExamInfo, getUserExam, saveExamAnswer } from '@/api/exam.js';
|
||||||
|
// import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||||
|
import Question from './question';
|
||||||
|
// import { getTheoryQuestion } from '@/api/competition';
|
||||||
|
import { getCompetitionDetail } from '@/api/competition';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
Question
|
||||||
|
},
|
||||||
|
mixins: [
|
||||||
|
// WindowResizeHandler
|
||||||
|
],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
index: 0,
|
||||||
|
height: 0,
|
||||||
|
loading: false,
|
||||||
|
formModel: {
|
||||||
|
description: '',
|
||||||
|
duration: 10,
|
||||||
|
name: '',
|
||||||
|
status: '',
|
||||||
|
totalScore: 0,
|
||||||
|
passScore: 10
|
||||||
|
},
|
||||||
|
totalScore: 0,
|
||||||
|
examQuestions: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
examId() {
|
||||||
|
return this.$route.params.examId;
|
||||||
|
},
|
||||||
|
userExamId() {
|
||||||
|
return this.$route.params.userExamId;
|
||||||
|
},
|
||||||
|
question() {
|
||||||
|
return this.examQuestions[this.index] || {};
|
||||||
|
},
|
||||||
|
index2UnicodeList() {
|
||||||
|
return ['一', '二', '三', '四'];
|
||||||
|
},
|
||||||
|
sortedList() {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
title: '判断题',
|
||||||
|
children: this.examQuestions.filter(el => { return el.type === 'judge'; })
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '选择题',
|
||||||
|
children: this.examQuestions.filter(el => { return el.type === 'select'; })
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$router': function() {
|
||||||
|
this.loadInitData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.loadInitData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
loadInitData() {
|
||||||
|
getCompetitionDetail(this.$route.query.raceId).then((resp)=>{
|
||||||
|
if (resp.data) {
|
||||||
|
resp.data.forEach((item, i) => {
|
||||||
|
this.examQuestions.push({...item.question, ...{answer: String(item.answerOptionId), score: item.score, index: i}});
|
||||||
|
});
|
||||||
|
this.totalScore = resp.data.reduce((pre, ver) => pre + ver.score, 0);
|
||||||
|
}
|
||||||
|
}).catch(error => { this.$message.error(`加载考试详情失败:${error.message}`); });
|
||||||
|
},
|
||||||
|
returnTop() {
|
||||||
|
document.querySelector('.el-header').scrollIntoView(true);
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
if (this.$route.query.result) {
|
||||||
|
const query = { raceId:this.$route.query.raceId };
|
||||||
|
this.$router.push({path: `/refereeJsxt/home`, query: query });
|
||||||
|
} else {
|
||||||
|
const query = { raceId:this.$route.query.raceId };
|
||||||
|
this.$router.push({path: `/jsxt/home`, query: query });
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
.layer-center {
|
||||||
|
width: 900px;
|
||||||
|
height: 100%;
|
||||||
|
margin: auto;
|
||||||
|
background: #fff;
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.quiz {
|
||||||
|
background: #eee;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
display:none
|
||||||
|
}
|
||||||
|
|
||||||
|
&__card {
|
||||||
|
height: 100%;
|
||||||
|
.dir-item {
|
||||||
|
padding-left: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dir-caption {
|
||||||
|
padding-left: 10px;
|
||||||
|
line-height: 26px;
|
||||||
|
background: #f1f1f1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
&__container {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
&-header {
|
||||||
|
height: auto !important;
|
||||||
|
|
||||||
|
.titles {
|
||||||
|
font-size: 24px;
|
||||||
|
line-height: 60px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notes {
|
||||||
|
color:#606266;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
margin: 0 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-main {
|
||||||
|
.section {
|
||||||
|
padding: 5px 20px;
|
||||||
|
.caption {
|
||||||
|
line-height: 26px;
|
||||||
|
}
|
||||||
|
.context {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-footer {
|
||||||
|
text-align: right;
|
||||||
|
position: sticky;
|
||||||
|
bottom: 0px;
|
||||||
|
padding: 40px ;
|
||||||
|
.buttons {
|
||||||
|
position: relative;
|
||||||
|
bottom: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
127
src/views/jsxt/refereeList/editScore.vue
Normal file
127
src/views/jsxt/refereeList/editScore.vue
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-dialogDrag title="修改分数" :visible.sync="show" top="150px" width="500px" :before-do-close="doClose" :close-on-click-modal="false">
|
||||||
|
<el-form ref="form" :model="info" :rules="rules" label-width="150px" class="demo-ruleForm">
|
||||||
|
<el-form-item :label="'理论分数('+ theoryScore +')'" prop="theoryScore">
|
||||||
|
<el-input v-model="info.theoryScore" style="width: 200px" />
|
||||||
|
<!-- <span style="font-size: 12px;margin-left: 10px;">(总分 {{ theoryScore }})</span> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="'实操分数('+ practicalScore +')'" prop="practiceScore">
|
||||||
|
<el-input v-model="info.practiceScore" style="width: 200px" />
|
||||||
|
<!-- <span style="font-size: 12px;margin-left: 10px;">(总分 {{ practicalScore }})</span> -->
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div class="edit_score">
|
||||||
|
<el-button type="primary" size="medium" :loading="loading" @click="editScore">修改</el-button>
|
||||||
|
<el-button size="medium" @click="doClose">取消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { putRefereeScoring, getTestPaperDatail } from '@/api/competition';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name:'EditScore',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
loading:false,
|
||||||
|
info: {
|
||||||
|
raceId: 0,
|
||||||
|
userId: 0,
|
||||||
|
theoryScore: 0,
|
||||||
|
practiceScore: 0
|
||||||
|
},
|
||||||
|
theoryScore: 0,
|
||||||
|
practicalScore: 0
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
rules() {
|
||||||
|
return {
|
||||||
|
theoryScore: [
|
||||||
|
{ required: true, message: '请输入理论分数', trigger: 'blur' },
|
||||||
|
{ validator: this.validatorNumber1 }
|
||||||
|
],
|
||||||
|
practiceScore: [
|
||||||
|
{ required: true, message: '请输入实操分数', trigger: 'blur' },
|
||||||
|
{ validator: this.validatorNumber2 }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(data) {
|
||||||
|
this.show = true;
|
||||||
|
this.reloadInfo(data);
|
||||||
|
},
|
||||||
|
reloadInfo(data) {
|
||||||
|
getTestPaperDatail(data.raceId).then(res => {
|
||||||
|
this.theoryScore = res.data.theoryScore;
|
||||||
|
this.practicalScore = res.data.practicalScore;
|
||||||
|
console.log(data);
|
||||||
|
this.info = {
|
||||||
|
raceId: data.raceId,
|
||||||
|
userId: data.userId,
|
||||||
|
theoryScore: data.artificialTheoryScore || data.theoryScore,
|
||||||
|
practiceScore: data.artificialPracticeScore || data.practiceScore
|
||||||
|
};
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.show = false;
|
||||||
|
},
|
||||||
|
editScore() {
|
||||||
|
this.$refs['form'].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
const data = {
|
||||||
|
raceId: this.info.raceId,
|
||||||
|
userId: this.info.userId,
|
||||||
|
artificialTheoryScore: Number(this.info.theoryScore),
|
||||||
|
artificialPracticeScore: Number(this.info.practiceScore)
|
||||||
|
};
|
||||||
|
putRefereeScoring(data).then(res => {
|
||||||
|
this.doClose();
|
||||||
|
this.$message.success('修改分数成功');
|
||||||
|
}).catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
this.$message.error('修改分数失败');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
validatorNumber1(rule, value, callback) {
|
||||||
|
if (Number(value) < 0) {
|
||||||
|
callback(new Error('输入分数不能小于0'));
|
||||||
|
} else if (Number(value) > 0 && Number(value) <= this.theoryScore) {
|
||||||
|
callback();
|
||||||
|
} else if (Number(value) > this.theoryScore) {
|
||||||
|
callback(new Error('输入分数大于当前试题分值'));
|
||||||
|
} else {
|
||||||
|
callback(new Error('请输入正确的分数'));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
validatorNumber2(rule, value, callback) {
|
||||||
|
if (Number(value) < 0) {
|
||||||
|
callback(new Error('输入分数不能小于0'));
|
||||||
|
} else if (Number(value) > 0 && Number(value) <= this.practicalScore) {
|
||||||
|
callback();
|
||||||
|
} else if (Number(value) > this.practicalScore) {
|
||||||
|
callback(new Error('输入分数大于当前试题分值'));
|
||||||
|
} else {
|
||||||
|
callback(new Error('请输入正确的分数'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.edit_score{
|
||||||
|
text-align:center;
|
||||||
|
margin-top:20px;
|
||||||
|
}
|
||||||
|
/deep/{
|
||||||
|
.el-dialog__body{
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,18 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="refereeList">
|
<div class="refereeList">
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<!-- <question-list ref="questionList" /> -->
|
<edit-score ref="editScore" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { refereeEnterSimulation, loadingPaper, getRaceUserList } from '@/api/competition';
|
import { refereeEnterSimulation, loadingPaper, getRaceUserList } from '@/api/competition';
|
||||||
// import QuestionList from './questionList';
|
import editScore from './editScore';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RefereeList',
|
name: 'RefereeList',
|
||||||
components:{
|
components:{
|
||||||
// QuestionList
|
editScore
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -39,7 +39,6 @@ export default {
|
|||||||
query: this.queryFunction,
|
query: this.queryFunction,
|
||||||
selectCheckShow: false,
|
selectCheckShow: false,
|
||||||
indexShow: true,
|
indexShow: true,
|
||||||
afterQuery:this.afterQuery,
|
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '名字',
|
title: '名字',
|
||||||
@ -70,11 +69,17 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '理论分数',
|
title: '理论分数',
|
||||||
prop: 'theoryScore'
|
prop: 'theoryScore',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return row.artificialTheoryScore ? `${row.theoryScore}(${row.artificialTheoryScore})` : row.theoryScore || '0'; },
|
||||||
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '实操分数',
|
title: '实操分数',
|
||||||
prop: 'practiceScore'
|
prop: 'practiceScore',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return row.artificialPracticeScore ? `${row.practiceScore}(${row.artificialPracticeScore})` : row.practiceScore || '0'; },
|
||||||
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '总分',
|
title: '总分',
|
||||||
@ -98,7 +103,13 @@ export default {
|
|||||||
showControl: (row) => { return row.status == '3'; }
|
showControl: (row) => { return row.status == '3'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '回放',
|
name: '理论结果',
|
||||||
|
handleClick: this.handleTheoryResult,
|
||||||
|
type: '',
|
||||||
|
showControl: (row) => { return row.status == '5'; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '实操回放',
|
||||||
handleClick: this.playBack,
|
handleClick: this.playBack,
|
||||||
type: '',
|
type: '',
|
||||||
showControl: (row) => { return row.status == '4'; }
|
showControl: (row) => { return row.status == '4'; }
|
||||||
@ -136,7 +147,8 @@ export default {
|
|||||||
return statusDict[status];
|
return statusDict[status];
|
||||||
},
|
},
|
||||||
getData() {
|
getData() {
|
||||||
const params = {raceId:this.$route.query.raceId, pageSize:999, pageNum:1};
|
const formModel = this.$refs.queryListPage.getFormModel();
|
||||||
|
const params = {raceId:this.$route.query.raceId, pageSize:999, pageNum:1, name: formModel ? formModel.name : '', organization: formModel ? formModel.organization : ''};
|
||||||
getRaceUserList(params).then(response=>{
|
getRaceUserList(params).then(response=>{
|
||||||
this.queryList.data = response.data.list;
|
this.queryList.data = response.data.list;
|
||||||
this.refresh();
|
this.refresh();
|
||||||
@ -148,6 +160,9 @@ export default {
|
|||||||
}, 2000);
|
}, 2000);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleTheoryResult() {
|
||||||
|
this.$router.replace({ path: `/jsxt/theory/result?raceId=${this.$route.query.raceId}&result=true` });
|
||||||
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
const loading = this.$loading({
|
const loading = this.$loading({
|
||||||
lock: true,
|
lock: true,
|
||||||
@ -164,7 +179,7 @@ export default {
|
|||||||
reader.readAsText(f, 'utf-8');
|
reader.readAsText(f, 'utf-8');
|
||||||
reader.onload = function(e) {
|
reader.onload = function(e) {
|
||||||
const data = e.target.result;
|
const data = e.target.result;
|
||||||
console.log(JSON.parse(data));
|
// console.log(JSON.parse(data));
|
||||||
loadingPaper(that.$route.query.raceId, JSON.parse(data)).then(res => {
|
loadingPaper(that.$route.query.raceId, JSON.parse(data)).then(res => {
|
||||||
that.$message.success('试题加载成功');
|
that.$message.success('试题加载成功');
|
||||||
loading.close();
|
loading.close();
|
||||||
@ -193,17 +208,9 @@ export default {
|
|||||||
},
|
},
|
||||||
playBack(index, row) {
|
playBack(index, row) {
|
||||||
},
|
},
|
||||||
gradeScore(index, row) {
|
gradeScore(index, row) { // 裁判打分
|
||||||
|
this.$refs.editScore.doShow(row);
|
||||||
},
|
},
|
||||||
// afterQuery(data) {
|
|
||||||
// clearTimeout(this.inter);
|
|
||||||
// this.inter = setTimeout(() => {
|
|
||||||
// if (!this.isLeaving) {
|
|
||||||
// this.refresh();
|
|
||||||
// }
|
|
||||||
// }, 3000);
|
|
||||||
// },
|
|
||||||
refresh() {
|
refresh() {
|
||||||
this.$refs.queryListPage.refresh(false);
|
this.$refs.queryListPage.refresh(false);
|
||||||
}
|
}
|
||||||
|
@ -1,83 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
title="试题列表"
|
|
||||||
:visible.sync="show"
|
|
||||||
top="20px"
|
|
||||||
width="500px"
|
|
||||||
:before-do-close="doClose"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-table :data="questionList" style="width: 100%" border @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column
|
|
||||||
type="selection"
|
|
||||||
width="55"
|
|
||||||
/>
|
|
||||||
<el-table-column prop="name" label="试题名称" />
|
|
||||||
</el-table>
|
|
||||||
<div class="startExam">
|
|
||||||
<span><el-button type="primary" :loading="loading" @click="startExam">开始竞赛</el-button></span>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import {getQuestionListByMapId, loadQuestionList} from '@/api/competition';
|
|
||||||
export default {
|
|
||||||
name:'QuestionList',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
show: false,
|
|
||||||
loading:false,
|
|
||||||
questionList:[
|
|
||||||
{id:1, name:'实操试题1'},
|
|
||||||
{id:2, name:'实操试题2'},
|
|
||||||
{id:3, name:'实操试题3'},
|
|
||||||
{id:4, name:'实操试题4'},
|
|
||||||
{id:5, name:'实操试题5'},
|
|
||||||
{id:6, name:'实操试题6'},
|
|
||||||
{id:7, name:'实操试题7'}
|
|
||||||
],
|
|
||||||
multipleSelection:[]
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow() {
|
|
||||||
this.show = true;
|
|
||||||
this.reloadTable();
|
|
||||||
},
|
|
||||||
reloadTable() {
|
|
||||||
getQuestionListByMapId({mapId:41, pageNum:10, pageSize:1}).then(response=>{
|
|
||||||
// this.questionList = response.data;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.show = false;
|
|
||||||
},
|
|
||||||
handleSelectionChange(val) {
|
|
||||||
this.multipleSelection = val;
|
|
||||||
},
|
|
||||||
startExam() {
|
|
||||||
if (this.multipleSelection.length > 0) {
|
|
||||||
const ids = [];
|
|
||||||
this.multipleSelection.forEach(question=>{
|
|
||||||
ids.push(question.id);
|
|
||||||
});
|
|
||||||
loadQuestionList(1, ids).then((response)=>{
|
|
||||||
this.$message('开始考试成功!');
|
|
||||||
this.doClose();
|
|
||||||
}).catch(()=>{
|
|
||||||
this.$message('开始考试失败');
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.$messageBox('请选择试题');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.startExam{
|
|
||||||
text-align:center;
|
|
||||||
margin-top:20px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -69,7 +69,7 @@ import { setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
|||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import md5 from 'js-md5';
|
import md5 from 'js-md5';
|
||||||
import { UrlConfig } from '@/scripts/ConstDic';
|
import { UrlConfig } from '@/scripts/ConstDic';
|
||||||
import { ProjectIcon } from '@/scripts/ProjectConfig';
|
import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
|
||||||
import { removeToken } from '@/utils/auth';
|
import { removeToken } from '@/utils/auth';
|
||||||
import LangStorage from '@/utils/lang';
|
import LangStorage from '@/utils/lang';
|
||||||
import logoImgHyd from '@/assets/project_icon/logo_hyd.png';
|
import logoImgHyd from '@/assets/project_icon/logo_hyd.png';
|
||||||
@ -121,7 +121,7 @@ export default {
|
|||||||
lang: 'zh',
|
lang: 'zh',
|
||||||
language: '中文',
|
language: '中文',
|
||||||
logoImg: logoImgHyd,
|
logoImg: logoImgHyd,
|
||||||
title: '城市轨道交通实训平台'
|
title: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -151,7 +151,9 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.project.startsWith('design')) {
|
if (this.project.startsWith('design')) {
|
||||||
this.title = '城市轨道交通设计平台';
|
this.title = loginInfo['designhyd'].title;
|
||||||
|
} else {
|
||||||
|
this.title = loginInfo['hyd'].title;
|
||||||
}
|
}
|
||||||
document.title = this.title;
|
document.title = this.title;
|
||||||
},
|
},
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<div class="userBubble" @click="playAudio('audio'+index)">
|
<div class="userBubble" @click="playAudio('audio'+index)">
|
||||||
<div class="userMessage">
|
<div class="userMessage">
|
||||||
<!-- &&!(chatContent.self) -->
|
<!-- &&!(chatContent.self) -->
|
||||||
<span v-if="chatContent.all">@{{ covertName(chatContent.targetName) }}</span>
|
<span v-if="chatContent.all">@{{ covertName(chatContent.targetUser) }}</span>
|
||||||
<span class="el-icon-video-play playicon" />
|
<span class="el-icon-video-play playicon" />
|
||||||
<span class="messageText">{{ chatContent.message }}</span>
|
<span class="messageText">{{ chatContent.message }}</span>
|
||||||
<audio :id="'audio'+index" :src="baseUrl+chatContent.src" style="display:none" />
|
<audio :id="'audio'+index" :src="baseUrl+chatContent.src" style="display:none" />
|
||||||
@ -78,7 +78,7 @@ export default {
|
|||||||
coversition.self = true;
|
coversition.self = true;
|
||||||
}
|
}
|
||||||
coversition.src = coversition.isAudio ? `/jlcloud/audio/${coversition.audioPath}` : '';
|
coversition.src = coversition.isAudio ? `/jlcloud/audio/${coversition.audioPath}` : '';
|
||||||
coversition.targetName = coversition.targetMember ? coversition.targetMember : 'All';
|
coversition.targetUser = coversition.targetMember ? coversition.targetMember : 'All';
|
||||||
return coversition;
|
return coversition;
|
||||||
});
|
});
|
||||||
this.chatContentList = coversitionList;
|
this.chatContentList = coversitionList;
|
||||||
@ -103,26 +103,37 @@ export default {
|
|||||||
},
|
},
|
||||||
covertName(data) {
|
covertName(data) {
|
||||||
if (data != 'All') {
|
if (data != 'All') {
|
||||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
if (data instanceof Array) {
|
||||||
roleTypeList.forEach(function(element) {
|
let result = '';
|
||||||
const rolename = element.value;
|
data.forEach(each=>{
|
||||||
if (Cookies.get('user_lang') == 'en') {
|
result += this.covertEachName(each);
|
||||||
if (rolename == data.role) {
|
});
|
||||||
data.role = element.enLabel;
|
return result;
|
||||||
}
|
} else {
|
||||||
} else {
|
return this.covertEachName(data);
|
||||||
if (rolename == data.role) {
|
}
|
||||||
data.role = element.label;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const deviceName = data.deviceName ? '-' + data.deviceName : '';
|
|
||||||
const memberName = data.name ? '-' + data.name : '';
|
|
||||||
return data.role + deviceName + memberName;
|
|
||||||
} else {
|
} else {
|
||||||
return 'All';
|
return '@All';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
covertEachName(data) {
|
||||||
|
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||||
|
roleTypeList.forEach(function(element) {
|
||||||
|
const rolename = element.value;
|
||||||
|
if (Cookies.get('user_lang') == 'en') {
|
||||||
|
if (rolename == data.role) {
|
||||||
|
data.role = element.enLabel;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (rolename == data.role) {
|
||||||
|
data.role = element.label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const deviceName = data.deviceName ? '-' + data.deviceName : '';
|
||||||
|
const memberName = data.name ? '-' + data.name : '';
|
||||||
|
return '@' + data.role + deviceName + memberName;
|
||||||
|
},
|
||||||
playAudio(id) {
|
playAudio(id) {
|
||||||
document.querySelector('#' + id).play();
|
document.querySelector('#' + id).play();
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ export default {
|
|||||||
this.checkList = [];
|
this.checkList = [];
|
||||||
}
|
}
|
||||||
}).catch(error=>{
|
}).catch(error=>{
|
||||||
this.$messageBox('创建会话失败: ' + error.messagfe);
|
this.$messageBox('创建会话失败: ' + error.message);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
this.checkList = [];
|
this.checkList = [];
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
:offset-bottom="offsetBottom"
|
:offset-bottom="offsetBottom"
|
||||||
:group="group"
|
:group="group"
|
||||||
:quest-id="questId"
|
:quest-id="questId"
|
||||||
|
:user-role="userRole"
|
||||||
@tryTime="tryTime"
|
@tryTime="tryTime"
|
||||||
@hidepanel="hidepanel"
|
@hidepanel="hidepanel"
|
||||||
@quitQuest="quitQuest"
|
@quitQuest="quitQuest"
|
||||||
@ -151,6 +152,17 @@ export default {
|
|||||||
// return this.$route.query.prdType;
|
// return this.$route.query.prdType;
|
||||||
return this.$store.state.training.prdType;
|
return this.$store.state.training.prdType;
|
||||||
},
|
},
|
||||||
|
userRole() {
|
||||||
|
if (this.prdType == '02') {
|
||||||
|
return 'DISPATCHER';
|
||||||
|
} else if (this.prdType == '01') {
|
||||||
|
return 'STATION_SUPERVISOR';
|
||||||
|
} else if (this.prdType == '04') {
|
||||||
|
return 'DRIVER';
|
||||||
|
} else {
|
||||||
|
return 'AUDIENCE';
|
||||||
|
}
|
||||||
|
},
|
||||||
isDemon() {
|
isDemon() {
|
||||||
return this.mode === 'demon';
|
return this.mode === 'demon';
|
||||||
},
|
},
|
||||||
|
@ -188,7 +188,8 @@ export default {
|
|||||||
'04': '02', // 司机 => 行调
|
'04': '02', // 司机 => 行调
|
||||||
'05': '' // 派班 => null
|
'05': '' // 派班 => null
|
||||||
},
|
},
|
||||||
dataError: false
|
dataError: false,
|
||||||
|
planRunning:false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -278,10 +279,14 @@ export default {
|
|||||||
this.mapBoxP = document.getElementById(this.canvasId).children[0];
|
this.mapBoxP = document.getElementById(this.canvasId).children[0];
|
||||||
this.mapBoxP.style.cursor = '';
|
this.mapBoxP.style.cursor = '';
|
||||||
// this.mapBox = document.getElementsByTagName('canvas');
|
// this.mapBox = document.getElementsByTagName('canvas');
|
||||||
|
if (this.planRunning) {
|
||||||
|
this.$store.dispatch('training/simulationStart');
|
||||||
|
}
|
||||||
if (this.trainingId) {
|
if (this.trainingId) {
|
||||||
getTrainingStepsDetailNew(this.trainingId, { group: this.group }).then(resp => {
|
getTrainingStepsDetailNew(this.trainingId, { group: this.group }).then(resp => {
|
||||||
this.trainingObj = resp.data;
|
this.trainingObj = resp.data;
|
||||||
this.$store.dispatch('training/setTrainingData', this.trainingObj);
|
this.$store.dispatch('training/setTrainingData', this.trainingObj);
|
||||||
|
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`初始化失败实训内容失败: ${error.message}`);
|
this.$messageBox(`初始化失败实训内容失败: ${error.message}`);
|
||||||
});
|
});
|
||||||
@ -434,7 +439,7 @@ export default {
|
|||||||
this.questId = Number(resp.data.questId) || 0;
|
this.questId = Number(resp.data.questId) || 0;
|
||||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
||||||
if (resp.data.planRunning) {
|
if (resp.data.planRunning) {
|
||||||
this.$store.dispatch('training/simulationStart');
|
this.planRunning = resp.data.planRunning;
|
||||||
} else {
|
} else {
|
||||||
this.$store.dispatch('training/over');
|
this.$store.dispatch('training/over');
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menuTrainListOut" :class="{'xian_01' : lineCode == '11'}">
|
<div class="menuTrainListOut" :class="{'xian_01' : lineCode == '11'}">
|
||||||
<div v-if="drawer" class="menuTrainListBtn" @click="clickBtn">
|
<div v-if="drawer" class="menuTrainListBtn" @click="clickBtn">
|
||||||
<i class="el-icon-more" style="font-size: 20px;margin-top: 9px;transform-origin: 50% 50%;transform: rotate(90deg);margin-left: -10px;" /></div>
|
<i class="el-icon-more" style="font-size: 20px;margin-top: 9px;transform-origin: 50% 50%;transform: rotate(90deg);margin-left:0px;" /></div>
|
||||||
<div v-else class="menuTrainListBtn1" @click="clickBtn">
|
<div v-else class="menuTrainListBtn1" @click="clickBtn">
|
||||||
<div class="menuTrainListBtn1In">
|
<div class="menuTrainListBtn1In">
|
||||||
<i class="el-icon-more" style="font-size: 20px;margin-top: 9px;transform-origin: 50% 50%;transform: rotate(90deg);" />
|
<i class="el-icon-more" style="font-size: 20px;margin-top: 9px;transform-origin: 50% 50%;transform: rotate(90deg);" />
|
||||||
@ -12,11 +12,39 @@
|
|||||||
:show-close="false"
|
:show-close="false"
|
||||||
style="height: 100%;"
|
style="height: 100%;"
|
||||||
>
|
>
|
||||||
<div class="menuTrainList">
|
<div v-if="lineCode=='10'||lineCode=='11'" class="menuTrainList">
|
||||||
<el-table :data="trainList" height="100%" :highlight-current-row="true" @row-click="selectTrain">
|
<div class="bottomTrainListInfo">下行列车详细信息</div>
|
||||||
|
<el-table :data="bottomTrainList" height="45%" :highlight-current-row="true" @row-click="selectTrain">
|
||||||
|
<el-table-column property="groupNumber" label="车组号" width="70" />
|
||||||
|
<el-table-column property="tripNumber" label="车次号" width="70" />
|
||||||
|
<el-table-column property="destinationCode" label="目的地号" width="100" />
|
||||||
|
<el-table-column property="serviceNumber" label="表号" width="70" />
|
||||||
|
<el-table-column property="dt" label="早晚点" width="70">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>{{ covert(scope.row.dt) }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column property="right" label="是否上行" width="90" /> -->
|
||||||
|
</el-table>
|
||||||
|
<div class="topTrainListInfo">上行列车详细信息</div>
|
||||||
|
<el-table :data="topTrainList" height="45%" :highlight-current-row="true" style="border-radius:0px 0px 0px 5px;" @row-click="selectTrain">
|
||||||
|
<el-table-column property="groupNumber" label="车组号" width="70" />
|
||||||
|
<el-table-column property="tripNumber" label="车次号" width="70" />
|
||||||
|
<el-table-column property="destinationCode" label="目的地号" width="100" />
|
||||||
|
<el-table-column property="serviceNumber" label="表号" width="70" />
|
||||||
|
<el-table-column property="dt" label="早晚点" width="70">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>{{ covert(scope.row.dt) }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column property="right" label="是否上行" width="90" /> -->
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div v-else class="menuTrainList">
|
||||||
|
<el-table :data="trainList" height="100%" :highlight-current-row="true" style="border-radius:5px 0px 0px 5px;" @row-click="selectTrain">
|
||||||
<el-table-column property="groupNumber" label="车组号" width="130" />
|
<el-table-column property="groupNumber" label="车组号" width="130" />
|
||||||
<el-table-column property="serviceNumber" label="表号" width="130" />
|
|
||||||
<el-table-column property="tripNumber" label="车次号" width="130" />
|
<el-table-column property="tripNumber" label="车次号" width="130" />
|
||||||
|
<el-table-column property="serviceNumber" label="表号" width="130" />
|
||||||
<!-- <el-table-column property="right" label="是否上行" width="90" /> -->
|
<!-- <el-table-column property="right" label="是否上行" width="90" /> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
@ -30,7 +58,9 @@ export default {
|
|||||||
return {
|
return {
|
||||||
drawer: false,
|
drawer: false,
|
||||||
trainList:[],
|
trainList:[],
|
||||||
oldDevice: null
|
oldDevice: null,
|
||||||
|
topTrainList:[],
|
||||||
|
bottomTrainList:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -40,13 +70,29 @@ export default {
|
|||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
'$store.state.map.trainListUpdate': function (val) {
|
'$store.state.map.trainListUpdate': function (val) {
|
||||||
this.trainList = this.$store.state.map.map.trainList.filter((train)=>{
|
if (this.lineCode == '10' || this.lineCode == '11') {
|
||||||
return train.serviceNumber != '' && train.serviceNumber != undefined;
|
this.topTrainList = this.$store.state.map.map.trainList.filter((train)=>{
|
||||||
});
|
return train.serviceNumber != '' && train.serviceNumber != undefined && !train.right;
|
||||||
|
});
|
||||||
|
this.bottomTrainList = this.$store.state.map.map.trainList.filter((train)=>{
|
||||||
|
return train.serviceNumber != '' && train.serviceNumber != undefined && train.right;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.trainList = this.$store.state.map.map.trainList.filter((train)=>{
|
||||||
|
return train.serviceNumber != '' && train.serviceNumber != undefined;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
'$store.state.map.runPlanStatus': function (val) {
|
'$store.state.map.runPlanStatus': function (val) {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
this.trainList = [];
|
if (this.lineCode == '10' || this.lineCode == '11') {
|
||||||
|
this.topTrainList = [];
|
||||||
|
this.bottomTrainList = [];
|
||||||
|
} else {
|
||||||
|
this.trainList = [];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -66,6 +112,13 @@ export default {
|
|||||||
// 设置显示中心
|
// 设置显示中心
|
||||||
setCenter(code) {
|
setCenter(code) {
|
||||||
this.$emit('setCenter', code);
|
this.$emit('setCenter', code);
|
||||||
|
},
|
||||||
|
covert(data) {
|
||||||
|
let min = (Math.abs(data) - Math.abs(data) % 60) / 60;
|
||||||
|
let seconds = Math.abs(data) % 60;
|
||||||
|
min = min > 9 ? min : '0' + min;
|
||||||
|
seconds = seconds > 9 ? seconds : '0' + seconds;
|
||||||
|
return data == 0 ? '00:00' : (data > 0 ? min + ':' + seconds + 'E' : min + ':' + seconds + 'L');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -86,14 +139,14 @@ export default {
|
|||||||
right:2px;
|
right:2px;
|
||||||
}
|
}
|
||||||
.menuTrainListBtn{
|
.menuTrainListBtn{
|
||||||
width: 30px;
|
width: 20px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-radius: 6px 0px 0px 6px;
|
border-radius: 6px 0px 0px 6px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 45%;
|
top: 45%;
|
||||||
left: -4%;
|
left: -20px;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
}
|
}
|
||||||
@ -107,7 +160,13 @@ export default {
|
|||||||
width: 400px;
|
width: 400px;
|
||||||
height:100%;
|
height:100%;
|
||||||
border-radius: 10px 0px 0px 10px;
|
border-radius: 10px 0px 0px 10px;
|
||||||
padding: 5px;
|
// padding: 5px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
.topTrainListInfo,.bottomTrainListInfo{
|
||||||
|
padding: 10px 10px;
|
||||||
|
background: #cde2ef;
|
||||||
|
font-size: 13px;
|
||||||
|
border-radius: 5px 0px 0px 0px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -433,7 +433,13 @@ export default {
|
|||||||
let list = [];
|
let list = [];
|
||||||
nameList.forEach(item => {
|
nameList.forEach(item => {
|
||||||
if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
|
if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
|
||||||
list = [...list, ...this.$store.state.map.map[item]];
|
if (item === 'trainList') {
|
||||||
|
this.$store.state.map.map[item].forEach(elem => {
|
||||||
|
elem && list.push(elem);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
list = [...list, ...this.$store.state.map.map[item]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.$jlmap.updateShowStation(list, stationCode);
|
this.$jlmap.updateShowStation(list, stationCode);
|
||||||
|
@ -1,201 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="chat-coversition">
|
|
||||||
<div id="coversition-list-name" />
|
|
||||||
<div class="coversition-list">
|
|
||||||
<div
|
|
||||||
v-for="coversition in coversitionList"
|
|
||||||
:key="coversition.id"
|
|
||||||
:class="coversition.id==currentCoversition.id?'coversition-active each-coversition':'each-coversition'"
|
|
||||||
@click="changeCoversition(coversition)"
|
|
||||||
>{{ coversition.coverName }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
|
||||||
import Cookies from 'js-cookie';
|
|
||||||
import {getSimulationConversationListNew} from '@/api/chat';
|
|
||||||
export default {
|
|
||||||
name:'ChatCoversitionList',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
coversitionList:[],
|
|
||||||
currentCoversition:{}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.initPage(true);
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
initPage(status) {
|
|
||||||
getSimulationConversationListNew(this.$route.query.group).then(resp=>{
|
|
||||||
if (resp.data) {
|
|
||||||
const data = resp.data;
|
|
||||||
data.map(coversition=>{
|
|
||||||
if (coversition.name) {
|
|
||||||
coversition.coverName = coversition.name;
|
|
||||||
coversition.isOnline = true;
|
|
||||||
} else {
|
|
||||||
const objectCover = this.handleMemberName(coversition);
|
|
||||||
coversition.coverName = objectCover.coversitionName;
|
|
||||||
coversition.isOnline = objectCover.isOnline;
|
|
||||||
}
|
|
||||||
|
|
||||||
return coversition;
|
|
||||||
});
|
|
||||||
this.coversitionList = data;
|
|
||||||
if (resp.data && resp.data.length && resp.data.length > 0 && status) {
|
|
||||||
this.currentCoversition = data[0];
|
|
||||||
this.$emit('setCurrentCoversition', resp.data[0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
addCoversition(data) {
|
|
||||||
const index = this.coversitionList.findIndex(item=>{ return item.id == data.id; });
|
|
||||||
if (index < 0) {
|
|
||||||
const objectCover = this.handleMemberName(data);
|
|
||||||
if (data.name) {
|
|
||||||
data.coverName = data.name;
|
|
||||||
data.isOnline = true;
|
|
||||||
} else {
|
|
||||||
data.coverName = objectCover.coversitionName;
|
|
||||||
data.isOnline = objectCover.isOnline;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.coversitionList.push(data);
|
|
||||||
this.currentCoversition = data;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
changeCoversition(coversition) {
|
|
||||||
this.$emit('setHeadTitle', coversition.coverName);
|
|
||||||
this.currentCoversition = {id:coversition.id, all:coversition.all};
|
|
||||||
this.$emit('setCurrentCoversition', coversition);
|
|
||||||
// this.$refs.chatContent.reloadData(this.currentCoversition);
|
|
||||||
},
|
|
||||||
changeCoversitionOther(coversition) {
|
|
||||||
const objectCover = this.handleMemberName(coversition);
|
|
||||||
coversition.coverName = objectCover.coversitionName;
|
|
||||||
coversition.isOnline = objectCover.isOnline;
|
|
||||||
const index = this.coversitionList.findIndex(item=>{ return item.id == coversition.id; });
|
|
||||||
if (index < 0) {
|
|
||||||
this.coversitionList.push(coversition);
|
|
||||||
}
|
|
||||||
this.changeCoversition(coversition);
|
|
||||||
},
|
|
||||||
handleMemberName(conversition) {
|
|
||||||
if (conversition.all) {
|
|
||||||
return {coversitionName:conversition.name, isOnline:true};
|
|
||||||
} else {
|
|
||||||
let coversitionName = '';
|
|
||||||
let isOnline = true;
|
|
||||||
if (conversition.memberList) {
|
|
||||||
conversition.memberList.forEach(member=>{
|
|
||||||
if (member.userId != this.$store.state.user.id) {
|
|
||||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
|
||||||
let data = member.role;
|
|
||||||
roleTypeList.forEach(function(element) {
|
|
||||||
const rolename = element.value;
|
|
||||||
if (Cookies.get('user_lang') == 'en') {
|
|
||||||
data = data.replace(rolename, element.enLabel);
|
|
||||||
} else {
|
|
||||||
data = data.replace(rolename, element.label);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const deviceName = member.deviceName ? '-' + member.deviceName : '';
|
|
||||||
const memberName = member.name ? '-' + member.name : '';
|
|
||||||
isOnline = member.online;
|
|
||||||
coversitionName = data + deviceName + memberName;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if (conversition.member) {
|
|
||||||
const member = conversition.member;
|
|
||||||
let data = member.role;
|
|
||||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
|
||||||
roleTypeList.forEach(function(element) {
|
|
||||||
const rolename = element.value;
|
|
||||||
if (Cookies.get('user_lang') == 'en') {
|
|
||||||
data = data.replace(rolename, element.enLabel);
|
|
||||||
} else {
|
|
||||||
data = data.replace(rolename, element.label);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const deviceName = member.deviceName ? '-' + member.deviceName : '';
|
|
||||||
const memberName = member.name ? '-' + member.name : '';
|
|
||||||
isOnline = member.online;
|
|
||||||
coversitionName = data + deviceName + memberName;
|
|
||||||
} else {
|
|
||||||
coversitionName = conversition.name;
|
|
||||||
}
|
|
||||||
return {coversitionName:coversitionName, isOnline:isOnline};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.chat-coversition{
|
|
||||||
width: 100px;
|
|
||||||
display: inline-block;
|
|
||||||
border-right: 1px #dedede solid;
|
|
||||||
height: 100%;
|
|
||||||
vertical-align: top;
|
|
||||||
background: #f9f9f9;
|
|
||||||
border-radius: 5px 0px 0px 5px;
|
|
||||||
}
|
|
||||||
.coversition-list{
|
|
||||||
padding: 3px 0px 10px 0px;
|
|
||||||
height: 355px;
|
|
||||||
overflow: auto;
|
|
||||||
margin-top:40px;
|
|
||||||
}
|
|
||||||
.each-coversition{
|
|
||||||
font-size: 14px;
|
|
||||||
padding: 10px 7px 10px 10px;
|
|
||||||
border-bottom: 1px #dedede solid;
|
|
||||||
cursor: pointer;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.coversition-active{
|
|
||||||
background: #e0e0e0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 谷歌、safari、qq浏览器、360浏览器滚动条样式
|
|
||||||
// 定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸
|
|
||||||
.coversition-list::-webkit-scrollbar {
|
|
||||||
width: 6px;
|
|
||||||
height: 6px;
|
|
||||||
// height: 110px;
|
|
||||||
background-color: #FFFFFF;
|
|
||||||
}
|
|
||||||
/*定义滚动条轨道 内阴影+圆角*/
|
|
||||||
.coversition-list::-webkit-scrollbar-track {
|
|
||||||
// box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
|
||||||
border-radius: 10px;
|
|
||||||
background-color: #FFFFFF;;
|
|
||||||
}
|
|
||||||
/*定义滑块 内阴影+圆角*/
|
|
||||||
.coversition-list::-webkit-scrollbar-thumb {
|
|
||||||
border-radius: 10px;
|
|
||||||
// box-shadow: inset 0 0 6px rgba(0,0,0,.3);
|
|
||||||
background-color: #cacaca;
|
|
||||||
}
|
|
||||||
/*滑块效果*/
|
|
||||||
.coversition-list::-webkit-scrollbar-thumb:hover {
|
|
||||||
border-radius: 5px;
|
|
||||||
// box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
|
||||||
background: rgba(0,0,0,0.4);
|
|
||||||
}
|
|
||||||
/*IE滚动条颜色*/
|
|
||||||
html {
|
|
||||||
scrollbar-face-color:#bfbfbf;/*滚动条颜色*/
|
|
||||||
scrollbar-highlight-color:#000;
|
|
||||||
scrollbar-3dlight-color:#000;
|
|
||||||
scrollbar-darkshadow-color:#000;
|
|
||||||
scrollbar-Shadow-color:#adadad;/*滑块边色*/
|
|
||||||
scrollbar-arrow-color:rgba(0,0,0,0.4);/*箭头颜色*/
|
|
||||||
scrollbar-track-color:#eeeeee;/*背景颜色*/
|
|
||||||
}
|
|
||||||
</style>
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user