Merge remote-tracking branch 'origin/test'

This commit is contained in:
fan 2022-08-24 18:03:36 +08:00
commit 6802e297a8
225 changed files with 27632 additions and 4227 deletions

View File

@ -61,3 +61,19 @@ export function sendConversationText (group, id, data) {
data
});
}
/** 发送会话语音(新接口) */
export function sendChatAudioBase64 (group, data) {
return request({
url: `/simulation/${group}/operate/Conversation_Chat_Audio_Base64`,
method: 'post',
data
});
}
/** 发送会话文字(新接口) */
export function sendChatText (group, data) {
return request({
url: `/simulation/${group}/operate/Conversation_Chat_Text`,
method: 'post',
data
});
}

View File

@ -158,3 +158,92 @@ export function getTrainingTypeAndNumByMapIdAndPrdType(params) {
params
});
}
/** 已发布实训分页列表 */
export function getPublishTrainingListPaged(data) {
return request({
url: `/api/v2/training/published/page`,
method: 'post',
data
});
}
/** 已发布实训上架 */
export function publishTrainingPutOn(data) {
return request({
url: `/api/v2/training/published/put/on`,
method: 'post',
data
});
}
/** 已发布实训下架 */
export function publishTrainingPutOff(data) {
return request({
url: `/api/v2/training/published/pull/off`,
method: 'post',
data
});
}
/** 已发布实训删除 */
export function publishTrainingDelete(data) {
return request({
url: `/api/v2/training/published`,
method: 'delete',
data
});
}
/** 根据mapId查所有的已发布单操实训的基础信息 */
export function getPublishSingleList(mapId) {
return request({
url: `/api/v2/training/published/${mapId}/singles`,
method: 'get'
});
}
/** 根据mapId查所有的已发布场景实训的基础信息 */
export function getPublishScenesList(mapId) {
return request({
url: `/api/v2/training/published/${mapId}/scenes`,
method: 'get'
});
}
/** 根据实训id查该已发布实训的所有信息 */
export function getPublishTrainingDetail(trainingId) {
return request({
url: `/api/v2/training/published/${trainingId}`,
method: 'get'
});
}
/** 加载发布实训 */
export function loadPublishTraining(group, trainingId) {
return request({
url: `/api/training2Simulation/${group}/load/${trainingId}`,
method: 'post'
});
}
/** 加载草稿实训 */
export function loadDraftTraining(group, trainingId) {
return request({
url: ` /api/training2Simulation/${group}/load/draft/${trainingId}`,
method: 'post'
});
}
/** 开始实训 */
export function startTraining(group, params) {
return request({
url: `/api/training2Simulation/${group}/start`,
method: 'put',
params
});
}
/** 结束实训 */
export function endTraining(group) {
return request({
url: `/api/training2Simulation/${group}/finish`,
method: 'put'
});
}
/** 实训完成步骤 */
export function endTrainingStep(group, stepId) {
return request({
url: `/api/training2Simulation/${group}/completion/step/${stepId}`,
method: 'put'
});
}

View File

@ -28,6 +28,7 @@ export function postLicenseValidate(data) {
return request({
url: `/api/license/validate`,
method: 'post',
production: true,
// baseURL: 'https://joylink.club/jlcloud',
data
});

96
src/api/trainingManage.js Normal file
View File

@ -0,0 +1,96 @@
import request from '@/utils/request';
/** 获取当前用户的所有实训草稿数据 */
export function getAllTrainingList(params) {
return request({
url: `/api/v2/draft/training/all`,
method: 'get',
params
});
}
/** 分页获取当前用户的实训草稿数据 */
export function getTrainingList(data) {
return request({
url: `/api/v2/draft/training/info/page`,
method: 'post',
data
});
}
/** 创建实训草稿 */
export function createTraining(data) {
return request({
url: `/api/v2/draft/training/create`,
method: 'post',
data
});
}
/** 更新当前用户的某个实训草稿 */
export function updateTraining(data) {
return request({
url: `/api/v2/draft/training/update/info`,
method: 'post',
data
});
}
/** 查询步骤列表 */
export function getTrainingStepList(trainingId) {
return request({
url: `/api/v2/draft/training/${trainingId}/step/list`,
method: 'get'
});
}
/** 修改实训所有步骤 */
export function updateTrainingStep(id, data) {
return request({
url: `/api/v2/draft/training/${id}/step/update`,
method: 'put',
data: data
});
}
/** 删除当前用户的实训草稿 */
export function deleteTraining(data) {
return request({
url: `/api/v2/draft/training`,
method: 'delete',
data: {trainingDraftIds: data}
});
}
/** 当前用户发布自己的实训草稿 */
export function publishTraining(data) {
return request({
url: `/api/v2/draft/training/publish`,
method: 'post',
data
});
}
/** 更新当前用户的某个实训草稿的大字段信息 */
export function updateTrainingContent(data) {
return request({
url: `/api/v2/draft/training/update/content`,
method: 'post',
data
});
}
/** 获取当前用户的某个实训草稿的所有信息 */
export function getTrainingAll(trainingId) {
return request({
url: `/api/v2/draft/training/all/${trainingId}`,
method: 'get'
});
}
/** 单独更新当前用户的某个实训草稿的初始背景 */
export function updateTrainingBackgroud(data) {
return request({
url: `/api/v2/draft/training/update/content/backgroud`,
method: 'post',
data
});
}
/** 更新当前用户实训草稿定位 */
export function updateTrainingMaplocation(data) {
return request({
url: `/api/v2/draft/training/update/content/maplocation`,
method: 'post',
data
});
}

View File

@ -657,4 +657,7 @@ export default {
margin-left: 8px;
}
.pageContainerView{text-align: center; margin: 10px 0; height: 40px;}
.hideOutContent {
min-height: 12px;
}
</style>

View File

@ -28,6 +28,7 @@ import approval from './approval';
import systemGenerate from './systemGenerate';
import login from './login';
import designPlatform from './designPlatform';
import trainingManage from './trainingManage';
export default {
enLocale,
@ -59,5 +60,6 @@ export default {
approval,
systemGenerate,
login,
designPlatform
designPlatform,
trainingManage
};

View File

@ -271,6 +271,8 @@ export default {
isStandTrack: 'Platform rail:',
standTrackName: 'Platform track name:',
standTrackNamePosition: 'Platform track name offset:',
stopCDPosition:'stopCD offset',
isHasStopCD:'is stopCD',
relStandCode: 'The platform code:',
isReentryTrack: 'Whether to return to orbit:',
reentryTrackName: 'Name of reentrant rail:',

View File

@ -97,6 +97,7 @@ export default {
boardManage: 'Message Board Manage',
publishIBPManage:'publish IBP Manage',
publishISCSManage:'publish ISCS Manage',
publishTrainingManage: 'publish Training Manage',
voiceTraining: 'Voice Training',
mapGroup: 'Map Group',
drawingMange:'Drawing Mange',

View File

@ -0,0 +1,25 @@
export default {
create: 'create',
editTagTitle: 'Training establishment',
name: 'The name of the training',
description: 'description',
type: 'type',
labelJson: 'tag',
operate: 'operate',
record: 'record',
modify: 'modify',
delete: 'delete',
publish: 'publish',
preview: 'preview',
mapLocation: 'Save map positioning',
saveBackground: 'Save Background',
saveData: 'Save Data',
stepNum: 'Step number',
stepDescription: 'Steps describe',
rulesId: 'Please enter the step number',
rulesDescription: 'Enter the prompt information',
createStepInfo: 'Creating Procedure Information',
editStepInfo: 'Modifying Step Information',
saveStepData: 'Save Step Information',
roleSelect: 'role choices'
};

View File

@ -28,6 +28,7 @@ import approval from './approval';
import systemGenerate from './systemGenerate';
import login from './login';
import designPlatform from './designPlatform';
import trainingManage from './trainingManage';
export default {
cnLocale,
@ -59,5 +60,6 @@ export default {
approval,
systemGenerate,
login,
designPlatform
designPlatform,
trainingManage
};

View File

@ -255,6 +255,8 @@ export default {
isStandTrack: '是否站台轨:',
standTrackName: '站台轨名称:',
standTrackNamePosition: '站台轨名称偏移量:',
stopCDPosition:'停车倒计时偏移量',
isHasStopCD:'停车倒计时',
relStandCode: '站台编码:',
isReentryTrack: '是否折返轨:',
reentryTrackName: '折返轨名称:',

View File

@ -101,6 +101,7 @@ export default {
boardManage: '留言板管理',
publishIBPManage:'发布IBP盘管理',
publishISCSManage:'发布ISCS管理',
publishTrainingManage: '发布实训管理',
voiceTraining: '语音训练',
mapGroup: '地图分组',
drawingMange:'图纸管理',

View File

@ -0,0 +1,25 @@
export default {
create: '创建',
editTagTitle: '实训编制',
name: '实训名称',
description: '描述',
type: '类型',
labelJson: '标签',
operate: '操作',
record: '编制',
modify: '修改',
delete: '删除',
publish: '发布',
preview: '预览',
mapLocation: '保存地图定位',
saveBackground: '保存背景',
saveData: '保存数据',
stepNum: '步骤序号',
stepDescription: '步骤描述',
rulesId: '请输入步骤序号',
rulesDescription: '请输入步骤提示信息',
createStepInfo: '创建步骤信息',
editStepInfo: '修改步骤信息',
saveStepData: '保存步骤',
roleSelect: '角色选择'
};

View File

@ -16,7 +16,8 @@ const mapDeviceStyle = {
'15': 'datie_01', // 大铁线路一
'16': 'datie_02', // 大铁线路二
'17':'datie_tky', // 铁科院大铁线路
'18':'datie_jd1a'
'18':'datie_jd1a',
'19': 'datie_ksk' // 大铁 卡斯柯
};
export function selectLineCode(code) {

View File

@ -207,7 +207,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lamp: {
fill: '#f1f1f1', // 填充色
radiusR: 7 // 控制灯大小
@ -256,7 +255,6 @@ class SkinCode extends defaultStyle {
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -591,7 +589,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细

View File

@ -516,7 +516,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -530,8 +529,6 @@ class SkinCode extends defaultStyle {
};
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细

View File

@ -345,7 +345,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lamp: {
fill: '#f1f1f1', // 填充色
radiusR: 7 // 控制灯大小
@ -497,7 +496,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.PowerSupply] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -511,7 +509,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.Maintain] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -523,7 +520,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.NoOneReturn] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11,
fontWeight: 'normal',
@ -535,7 +531,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AtsControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -548,7 +543,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.MaintenanceLamps] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -560,7 +554,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.ZcCommunication] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -572,7 +565,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.ChainControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -585,7 +577,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.IntersiteControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -597,7 +588,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.CenterCommunication] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -609,7 +599,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.LeuControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -621,7 +610,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.LocalControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -683,8 +671,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件prdType 为01
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -726,8 +712,6 @@ class SkinCode extends defaultStyle {
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细

View File

@ -329,7 +329,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lamp: {
fill: '#f1f1f1', // 填充色
radiusR: 7 // 控制灯大小
@ -395,8 +394,8 @@ class SkinCode extends defaultStyle {
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
purpleColor:'#840084', // 控制模式紫色
strokeColor: '#fff',
lineWidth: 1
strokeColor: '#fff',
lineWidth: 1
},
emergencyControl: { // 紧急站控
show: false,
@ -427,25 +426,25 @@ class SkinCode extends defaultStyle {
arrowShow: false,
grayColor: '#7F7F7F'
},
veryControl: {
show: true,
offset: { x: 0, y: 0 },
text: '非常站控'
},
selfDiscipline: {
show: true,
offset: { x: 0, y: 0 },
text: '允许自律'
},
selfDisciplineControl: {
show: true,
offset: { x: 0, y: 0 },
text: '自律控制'
},
veryControlButton: {
offset: { x: 0, y: 0 },
text: '非常站控'
}
veryControl: {
show: true,
offset: { x: 0, y: 0 },
text: '非常站控'
},
selfDiscipline: {
show: true,
offset: { x: 0, y: 0 },
text: '允许自律'
},
selfDisciplineControl: {
show: true,
offset: { x: 0, y: 0 },
text: '自律控制'
},
veryControlButton: {
offset: { x: 0, y: 0 },
text: '非常站控'
}
}
};
@ -515,7 +514,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.PowerSupply] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -529,7 +527,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.Maintain] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -541,7 +538,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.NoOneReturn] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11,
fontWeight: 'normal',
@ -553,7 +549,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AtsControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -566,7 +561,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.MaintenanceLamps] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -578,7 +572,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.ZcCommunication] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -590,7 +583,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.ChainControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -603,7 +595,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.IntersiteControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -615,7 +606,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.CenterCommunication] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -627,7 +617,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.LeuControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -639,7 +628,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.LocalControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -701,8 +689,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件prdType 为01
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -744,8 +730,6 @@ class SkinCode extends defaultStyle {
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -935,7 +919,6 @@ class SkinCode extends defaultStyle {
this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {};
this[deviceType.IndicatorLight] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
indicator:{
radiusR:6,
offset:{ x:0, y:20},

View File

@ -140,6 +140,7 @@ class SkinCode extends defaultStyle {
endWidth: 2, // 尽头分隔符宽度
endColor: 'rgb(128,128,128)', // 尽头分隔符颜色
color: 'rgb(128,128,128)', // 区段边界符颜色
invadeSpecial:true, // 特殊侵限
halfHeight: 3 // 区段分隔符高度的一半
},
@ -163,16 +164,20 @@ class SkinCode extends defaultStyle {
},
trainPosition:{
display: false // 列车实时位置显示
},
remainTime:{
circleBack:'',
textColor:''
}
};
this[deviceType.Signal] = {
distance: 10, // 设备距离区段的距离
distance: 12, // 设备距离区段的距离
colorSpecial: true, // 特殊处理灯位颜色
post: {
standardLength: 6, // 高柱长度
standardHeight: 6, // 灯柱高度
standardColor: '#FFFFFF', // 灯柱颜色
standardLength: 7, // 高柱长度
standardHeight: 7, // 灯柱高度
standardColor: 'rgb(85,120,182)', // 灯柱颜色
standardVerticalWidth: 2, // 灯柱竖杆宽度
standardRailWidth: 2 // 灯柱横杆宽度
},
@ -182,8 +187,8 @@ class SkinCode extends defaultStyle {
isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: '#FFFFFF', // 信号灯字体默认色
blockColor: '#FFFFFF', // 信号灯字体锁定颜色
defaultColor: 'rgb(192,192,192)', // 信号灯字体默认色
blockColor: 'rgb(192,192,192)', // 信号灯字体锁定颜色
checkColor: '#00FF00' // 信号保护区段检查颜色
},
remainTimeColor: '#F00',
@ -199,19 +204,21 @@ class SkinCode extends defaultStyle {
notBlock:true, // 封锁不设置颜色
bgShow: false, // 是否被选中
guidName: 'singleRY', // 成都三号线引导类型
borderVariable: false, // 信号灯边框可变
borderVariable: true, // 信号灯边框可变
stopWidth: 2, // 禁止线宽度
borderWidth: 2, // 信号灯边框线宽度
borderColor: '#677DBB', // 信号灯边框线颜色
borderWidth: 1, // 信号灯边框线宽度
borderColor: 'rgb(85,120,182)', // 信号灯边框线颜色
darkColor:'rgb(85,120,182)', //
radiusR: 6, // 信号灯半径
grayColor: '#7F7F7F', // 信号灯灰色
redColor: '#FF0000', // 信号灯红色
greenColor: '#00FF00', // 信号灯绿色
yellowColor: '#FFFF00', // 信号灯黄色
whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0070C0', // 信号灯蓝色
blueColor: 'rgb(60,66,235)', // 信号灯蓝色
faultType: 'light', // 信号机故障类型 light闪
special:true // 大铁类型信号机
special:true, // 大铁类型信号机
normalBorderShow:true
},
route: {
direction: true, // 自动通过方向
@ -256,6 +263,15 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.SignalButton] = {
width:12,
borderLine:1,
isShowBorder:true,
guideColor: 'rgb(80,80,255)',
trainColor:'rgb(0,128,0)',
strokeColor:'rgb(128,128,128)'
};
// 供电线路
this[deviceType.Power] = {
noElectricStrokeColor:'#808080', // 无电颜色
@ -330,7 +346,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lamp: {
fill: '#f1f1f1', // 填充色
radiusR: 7 // 控制灯大小
@ -453,6 +468,8 @@ class SkinCode extends defaultStyle {
offset: { x: 0, y: 0 },
text: '非常站控',
lightColor: '#ff0',
border:true, // 有边框
borderLine:1,
defaultColor: '#ccc'
},
selfDisciplineThree: {
@ -514,7 +531,7 @@ class SkinCode extends defaultStyle {
fontSize: 11, // 字体大小
fontColor: '#fff', // 道岔名称颜色
fontWeight: 'normal', // 字体粗细
borderColor: '#FE0000', // 道岔边框颜色
borderColor: '#FF0000', // 道岔边框颜色
lossColor: '#C00808', // 道岔失去颜色
locateColor: '#00FF00', // 道岔定位颜色
inversionColor: '#FFFF00', // 道岔反位颜色
@ -534,7 +551,7 @@ class SkinCode extends defaultStyle {
},
jointImg: { // 道岔 A B C D四元素属性配置
trapezoidLength: 8, // 直角梯形元素默认长度
faultStatus: true, // 挤岔表示
faultStatus: false, // 挤岔表示
fork: true, // 挤岔专用(如有挤岔操作 变为true
forKColor: 'red' // 挤岔颜色 配合挤岔专用
},
@ -548,15 +565,15 @@ class SkinCode extends defaultStyle {
rectWidth: 18, // 矩形框 宽高
rectBorderColor: '#fff', // 矩形边框颜色
block: true, // 封锁显示
blockColor: 'red', // 封锁颜色
blockColor: '#FF0000', // 封锁颜色
followName: true // 位置跟随名称确定
},
arcBlcok: { // 圆形封锁图形
show: true, // 显示
shapeR: 10,
arcBorderColor: 'red', // 默认边框颜色
locationColor: 'red', // 定位封锁颜色
inversionColor: 'red' // 反位封锁颜色
arcBorderColor: '#FF0000', // 默认边框颜色
locationColor: '#FF0000', // 定位封锁颜色
inversionColor: '#FF0000' // 反位封锁颜色
}
};
@ -572,7 +589,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.PowerSupply] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -586,7 +602,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.Maintain] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -598,7 +613,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.NoOneReturn] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11,
fontWeight: 'normal',
@ -610,7 +624,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AtsControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -623,7 +636,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.MaintenanceLamps] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -635,7 +647,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.ZcCommunication] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -647,7 +658,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.ChainControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -660,7 +670,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.IntersiteControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -668,11 +677,10 @@ class SkinCode extends defaultStyle {
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#00FF00' // 控制灯颜色
controlColor: '#00E600' // 控制灯颜色
}
};
this[deviceType.CenterCommunication] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -684,7 +692,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.LeuControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -696,7 +703,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.LocalControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -758,8 +764,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件prdType 为01
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -801,8 +805,6 @@ class SkinCode extends defaultStyle {
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -1004,7 +1006,6 @@ class SkinCode extends defaultStyle {
this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {};
this[deviceType.IndicatorLight] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
indicator:{
radiusR:6,
offset:{ x:0, y:20},
@ -1017,7 +1018,7 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.DepartArrow] = {
triangleLength: 15,
triangleLength: 12,
lineWidth: 8,
length: 35,
distance: 15,
@ -1032,7 +1033,7 @@ class SkinCode extends defaultStyle {
noBlockStatusColor:'#ffff00'
};
this[deviceType.PickArrow] = {
triangleLength: 15,
triangleLength: 12,
lineWidth: 8,
length: 35,
distance: 15,

View File

@ -259,26 +259,25 @@ class SkinCode extends defaultStyle {
this[deviceType.SignalButton] = {
shape: 'roundWithDock',
fillColor: '#808080',
showName: true,
}
showName: true
};
this[deviceType.SwitchFault] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 14, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: -50 // 灯跟文字距离
},
lamp: {
square: true, // 方形
square: true, // 方形
radiusR: 20,
switchState: true, // 是否用颜色表示道岔状态
controlColor: '#00ff00', // 定位颜色
reverseColor: '#ffff00', // 反位颜色
switchingColor: '#999999', // 转换中颜色
faultColor: '#ff0000', // 挤岔颜色
blockColor: '#0000ff', // 单封颜色
lockColor: '#ff0000', // 单锁颜色
switchState: true, // 是否用颜色表示道岔状态
controlColor: '#00ff00', // 定位颜色
reverseColor: '#ffff00', // 反位颜色
switchingColor: '#999999', // 转换中颜色
faultColor: '#ff0000', // 挤岔颜色
blockColor: '#0000ff', // 单封颜色
lockColor: '#ff0000', // 单锁颜色
lineWidth: 2,
strokeColor: '#FFFFFF' // 控制灯描边样式
}
@ -358,7 +357,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lamp: {
fill: '#f1f1f1', // 填充色
radiusR: 7 // 控制灯大小
@ -424,8 +422,8 @@ class SkinCode extends defaultStyle {
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
purpleColor:'#840084', // 控制模式紫色
strokeColor: '#fff',
lineWidth: 1
strokeColor: '#fff',
lineWidth: 1
},
emergencyControl: { // 紧急站控
show: false,
@ -456,81 +454,81 @@ class SkinCode extends defaultStyle {
arrowShow: false,
grayColor: '#7F7F7F'
},
veryControl: {
show: true,
offset: { x: 0, y: 0 },
lightColor: '#f00',
defaultColor: '#7F7F7F',
text: '非常站控'
},
selfDiscipline: {
show: true,
offset: { x: 0, y: 0 },
text: '允许自律',
veryControl: {
show: true,
offset: { x: 0, y: 0 },
lightColor: '#f00',
defaultColor: '#7F7F7F',
text: '非常站控'
},
selfDiscipline: {
show: true,
offset: { x: 0, y: 0 },
text: '允许自律',
defaultColor: '#7F7F7F',
lightColor: '#ff0'
},
selfDisciplineControl: {
show: true,
offset: { x: 0, y: 0 },
lightColor: '#0f0',
defaultColor: '#7F7F7F',
text: '自律控制'
},
veryControlButton: {
offset: { x: 0, y: 0 },
text: '非常站控',
lightColor: '#ff0',
},
selfDisciplineControl: {
show: true,
offset: { x: 0, y: 0 },
lightColor: '#0f0',
defaultColor: '#7F7F7F',
text: '自律控制'
},
veryControlButton: {
offset: { x: 0, y: 0 },
text: '非常站控',
lightColor: '#ff0',
defaultColor: '#ccc',
},
selfDisciplineThree: {
offset: { x: 0, y: 0 },
text: '分散自律',
lightColor: '#0f0',
defaultColor: '#ccc'
},
graphRoad: {
show: true,
offset: { x: 0, y: 0 },
text: '按图排路',
lightColor: '#0f0',
defaultColor: '#ccc'
},
planControl: {
show: true,
offset: { x: 0, y: 0 },
text: '计划控制',
lightColor: '#0f0',
defaultColor: '#ccc'
},
centerCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '中心通信',
lightColor: '#0f0',
defaultColor: '#ccc'
},
selfDisciplineCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '自律机通信',
lightColor: '#0f0',
defaultColor: '#ccc'
},
allowedTurnBack: {
show: true,
offset: { x: 0, y: 30 },
text: '允许转回',
lightColor: '#0f0',
defaultColor: '#ccc'
},
trainControl: {
show: true,
offset: { x: 0, y: 30 },
text: '列控',
lightColor: '#0f0',
defaultColor: '#ccc'
}
defaultColor: '#ccc'
},
selfDisciplineThree: {
offset: { x: 0, y: 0 },
text: '分散自律',
lightColor: '#0f0',
defaultColor: '#ccc'
},
graphRoad: {
show: true,
offset: { x: 0, y: 0 },
text: '按图排路',
lightColor: '#0f0',
defaultColor: '#ccc'
},
planControl: {
show: true,
offset: { x: 0, y: 0 },
text: '计划控制',
lightColor: '#0f0',
defaultColor: '#ccc'
},
centerCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '中心通信',
lightColor: '#0f0',
defaultColor: '#ccc'
},
selfDisciplineCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '自律机通信',
lightColor: '#0f0',
defaultColor: '#ccc'
},
allowedTurnBack: {
show: true,
offset: { x: 0, y: 30 },
text: '允许转回',
lightColor: '#0f0',
defaultColor: '#ccc'
},
trainControl: {
show: true,
offset: { x: 0, y: 30 },
text: '列控',
lightColor: '#0f0',
defaultColor: '#ccc'
}
}
};
@ -584,13 +582,13 @@ class SkinCode extends defaultStyle {
shapeR: 10,
arcBorderColor: 'red', // 默认边框颜色
locationColor: 'red', // 定位封锁颜色
inversionColor: 'red' // 反位封锁颜色
inversionColor: 'red' // 反位封锁颜色
},
switchDot: { // 岔心小圆点
switchDot: { // 岔心小圆点
show: true,
monoLockColor: '#ff0000', // 单锁 红色
lockColor: '#0000ff' // 单封 蓝色
},
monoLockColor: '#ff0000', // 单锁 红色
lockColor: '#0000ff' // 单封 蓝色
}
};
this[deviceType.LcControl] = {
@ -605,7 +603,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.PowerSupply] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -619,7 +616,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.Maintain] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -631,7 +627,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.NoOneReturn] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11,
fontWeight: 'normal',
@ -643,7 +638,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AtsControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -656,7 +650,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.MaintenanceLamps] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -668,7 +661,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.ZcCommunication] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -680,7 +672,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.ChainControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -693,7 +684,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.IntersiteControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -705,7 +695,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.CenterCommunication] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -717,7 +706,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.LeuControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -729,7 +717,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.LocalControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -791,8 +778,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件prdType 为01
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -834,8 +819,6 @@ class SkinCode extends defaultStyle {
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -887,8 +870,8 @@ class SkinCode extends defaultStyle {
lrPadding: 4, // 两边间隔
upPadding: 4, // 上边距离
trainBodyFillColor: '#88DF8E', // 列车车身填充颜色
trainSidelineColor: '#F00',
trainSidelineStopColor: '#000',
trainSidelineColor: '#F00',
trainSidelineStopColor: '#000',
// trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
trainNameFormat:'tripNumber'
},
@ -913,21 +896,21 @@ class SkinCode extends defaultStyle {
trainNumber: {
targetCodePrefix: '000', // 目的地码前缀
defaultTargetCode: 'DDD', // 默认目的地码
fontColor: '#F00',
trainTargetTextAlign: 'left', // 目的地码文字显示位置
fontColor: '#F00',
trainTargetTextAlign: 'left', // 目的地码文字显示位置
trainNumberOffset: { x: 24, y: 4}// 目的地码偏移量
},
trainServer: {
serviceNumberPrefix: '000', // 服务号(表号)前缀
defaultServiceNumber: 'TTT', // 默认服务号(表号)
defaultServerNoColor: '#F00', // 默认服务号状态显示颜色
fontColor: '#F00',
fontColor: '#F00',
trainServerOffset: { x: 4, y: 4} // 列车服务号偏移
},
trainTarget: {
tripNumberPrefix: '', // 车次号前缀
// defaultTripNumber: 'DDD', // 默认车次号2
defaultTripNumber: ' ', // 默认车次号
defaultTripNumber: ' ', // 默认车次号
trainTargetOffset: { x: 36, y: 4}, // 列车车次号偏移
trainTargetTextAlign: 'right' // 车次号文字显示位置
},
@ -939,13 +922,13 @@ class SkinCode extends defaultStyle {
trainHead: {
trainConntWidth: 10, // 列车竖杠的宽度
trainHeadFillColor: '#189B4D', // 列车车头矩形填充颜色
trainHeadRectNoChange: true, // 列车车头矩形填充颜色不变
trainHeadRectNoChange: true, // 列车车头矩形填充颜色不变
trainHeadRectHeight: 20, // 列车车头矩形高度
directionStopType:'specialAll', // special 西安二号线 停车 列车方向图标不消失 normal 正常
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
trainHeadArrowWidth: 15, // 列车车头三角宽度
trainHeadArrowOffsetX: 0, // 列车车头三角偏移
trainHeadRectOffsetX: 10
trainHeadRectOffsetX: 10
},
common: {
trainHeight: 20, // 列车高度
@ -995,16 +978,16 @@ class SkinCode extends defaultStyle {
{
type: 1,
lineLShow: true,
arrowLShow: false,
arrowLShow: false,
lineRShow: false,
arrowRShow: true
arrowRShow: true
},
{
type: 0,
lineLShow: false,
arrowLShow: true,
arrowLShow: true,
lineRShow: true,
arrowRShow: false
arrowRShow: false
}
], // 列车停止方向类型对应车头显示状态 1从左往右 0从右往左
driveModeStatus: [
@ -1039,7 +1022,6 @@ class SkinCode extends defaultStyle {
this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {};
this[deviceType.IndicatorLight] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
indicator:{
radiusR:6,
offset:{ x:0, y:20},
@ -1052,125 +1034,125 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.DepartArrow] = {
triangleLength: 15,
lineWidth: 8,
length: 35,
distance: 15,
fill: '#000',
stroke: '#fff',
fontSize: 11,
defaultText: '发车',
defaultColor: '#ccc',
triangleLength: 15,
lineWidth: 8,
length: 35,
distance: 15,
fill: '#000',
stroke: '#fff',
fontSize: 11,
defaultText: '发车',
defaultColor: '#ccc',
occupiedColor:'#f00',
noOccupiedColor:'#00ff00',
blockStatusColor:'#00ff00',
noBlockStatusColor:'#ffff00',
};
noBlockStatusColor:'#ffff00'
};
this[deviceType.PickArrow] = {
triangleLength: 15,
lineWidth: 8,
length: 35,
distance: 15,
fill: '#000',
stroke: '#fff',
fontSize: 11,
defaultText: '接车',
defaultColor: '#ccc',
triangleLength: 15,
lineWidth: 8,
length: 35,
distance: 15,
fill: '#000',
stroke: '#fff',
fontSize: 11,
defaultText: '接车',
defaultColor: '#ccc',
occupiedColor:'#f00',
noOccupiedColor:'#ffff00',
blockStatusColor:'#00ff00',
noBlockStatusColor:'#ffff00',
};
this[deviceType.Occlusion] = {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#ccc' // 控制灯颜色
}
};
this[deviceType.Accident] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.Recovery] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.PickAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.DepartAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.TotalAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.AssistStatus] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc',
occupiedColor:'#ffffff',
}
};
this[deviceType.SectionOccupied] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc',
occupiedColor:'#ff0000',
}
};
noBlockStatusColor:'#ffff00'
};
this[deviceType.Occlusion] = {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#ccc' // 控制灯颜色
}
};
this[deviceType.Accident] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.Recovery] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.PickAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.DepartAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.TotalAssist] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc'
}
};
this[deviceType.AssistStatus] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc',
occupiedColor:'#ffffff'
}
};
this[deviceType.SectionOccupied] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc',
occupiedColor:'#ff0000'
}
};
}
}

View File

@ -258,7 +258,36 @@ class SkinCode extends defaultStyle {
distanceY: 1 // 信号背景Y偏移距离
}
};
this[deviceType.SignalButton] = {
shape: 'roundWithDock',
fillColor: '#808080',
showName: true,
selectColor: '#0000ff',
flashingColor: '#ffff00',
countOffset: { x: 0, y: -15 },
typeList: ['PICK_ASSIST', 'DEPART_ASSIST', 'ASSIST', 'GUIDELOCK', 'SECTION_FAULT_UNLOCK', 'LOCATE', 'REVERSE', 'CANCEL', 'HUMAN_RELEASE_ROUTE', 'MONOLOCK',
'UNLOCK', 'BLOCK', 'UNBLOCK', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION', 'FAULT_NOTICE', 'GUIDE']
};
this[deviceType.SwitchFault] = {
text: {
fontSize: 14, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: -50 // 灯跟文字距离
},
lamp: {
square: true, // 方形
radiusR: 20,
switchState: true, // 是否用颜色表示道岔状态
controlColor: '#00ff00', // 定位颜色
reverseColor: '#ffff00', // 反位颜色
switchingColor: '#999999', // 转换中颜色
faultColor: '#ff0000', // 挤岔颜色
blockColor: '#0000ff', // 单封颜色
lockColor: '#ff0000', // 单锁颜色
lineWidth: 2,
strokeColor: '#FFFFFF' // 控制灯描边样式
}
};
// 供电线路
this[deviceType.Power] = {
noElectricStrokeColor:'#808080', // 无电颜色
@ -333,7 +362,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lamp: {
fill: '#f1f1f1', // 填充色
radiusR: 7 // 控制灯大小
@ -394,13 +422,13 @@ class SkinCode extends defaultStyle {
offset: {x: 0, y: 0}, // 偏移量
radiusR: 6, // 控制模式灯的半径
distance: 46, // 控制模式之间灯之间的距离
grayColor: '#7F7F7F', // 控制模式灰色
grayColor: '#1E1E1E', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
purpleColor:'#840084', // 控制模式紫色
strokeColor: '#fff',
lineWidth: 1
strokeColor: '#444444',
lineWidth: 3
},
emergencyControl: { // 紧急站控
show: false,
@ -432,7 +460,7 @@ class SkinCode extends defaultStyle {
grayColor: '#7F7F7F'
},
veryControl: {
show: true,
show: false,
offset: { x: 0, y: 0 },
lightColor: '#f00',
defaultColor: '#7F7F7F',
@ -440,23 +468,25 @@ class SkinCode extends defaultStyle {
},
selfDiscipline: {
show: true,
offset: { x: 0, y: 0 },
text: '允许自律',
defaultColor: '#7F7F7F',
lightColor: '#ff0'
offset: { x: 70, y: 0 },
text: '允许转回自律',
defaultColor: '#1E1E1E',
lightColor: '#ff0',
lineWidth: 3
},
selfDisciplineControl: {
show: true,
offset: { x: 0, y: 0 },
offset: { x: -40, y: 0 },
lightColor: '#0f0',
defaultColor: '#7F7F7F',
text: '自律控制'
defaultColor: '#1E1E1E',
text: '分散自律'
},
veryControlButton: {
shape: 'arc',
offset: { x: 0, y: 0 },
text: '非常站控',
lightColor: '#ff0',
defaultColor: '#ccc'
defaultColor: '#f00'
},
selfDisciplineThree: {
offset: { x: 0, y: 0 },
@ -539,7 +569,8 @@ class SkinCode extends defaultStyle {
trapezoidLength: 8, // 直角梯形元素默认长度
faultStatus: true, // 挤岔表示
fork: true, // 挤岔专用(如有挤岔操作 变为true
forKColor: 'red' // 挤岔颜色 配合挤岔专用
forKColor: 'red', // 挤岔颜色 配合挤岔专用
loseNameFlash: true // 失去表示时 道岔名闪
},
// arcBlcok: { // 圆形封锁图形
// show: false, // 显示
@ -575,21 +606,19 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.PowerSupply] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
radiusR: 3, // 控制灯大小
controlColor: '#00FF00', // 控制灯颜色
offColor: '#000',
strokeColor: '#fff'
}
};
this[deviceType.Maintain] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -601,7 +630,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.NoOneReturn] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11,
fontWeight: 'normal',
@ -613,20 +641,18 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AtsControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
radiusR: 3, // 控制灯大小
controlColor: '#00FF00', // 控制灯颜色
offColor: '#FF0000'
}
};
this[deviceType.MaintenanceLamps] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -638,7 +664,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.ZcCommunication] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -650,44 +675,53 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.ChainControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
radiusR: 3, // 控制灯大小
controlColor: '#00FF00', // 控制灯颜色
offColor: '#ff0000'
offColor: '#00FF00'
}
};
this[deviceType.ThroatRoute] = {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 4, // 控制灯大小
controlColor: '#1E1E1E', // 控制灯颜色
strokeColor: '#404040',
lineWidth: 3
}
};
this[deviceType.IntersiteControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
radiusR: 3, // 控制灯大小
controlColor: '#00FF00' // 控制灯颜色
}
};
this[deviceType.CenterCommunication] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
radiusR: 3, // 控制灯大小
controlColor: '#00FF00' // 控制灯颜色
}
};
this[deviceType.LeuControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -699,7 +733,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.LocalControl] = {
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -762,7 +795,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件prdType 为01
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -805,7 +837,6 @@ class SkinCode extends defaultStyle {
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -1009,7 +1040,6 @@ class SkinCode extends defaultStyle {
this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {};
this[deviceType.IndicatorLight] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
indicator:{
radiusR:6,
offset:{ x:0, y:20},
@ -1124,9 +1154,11 @@ class SkinCode extends defaultStyle {
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc',
occupiedColor:'#ffffff'
occupiedColor:'#ffffff',
radiusR: 4, // 控制灯大小
controlColor: '#1E1E1E', // 控制灯颜色
strokeColor: '#404040',
lineWidth: 3
}
};
this[deviceType.SectionOccupied] = {
@ -1136,11 +1168,30 @@ class SkinCode extends defaultStyle {
distance: 5
},
lamp: {
radiusR: 6,
controlColor: '#ccc',
occupiedColor:'#ff0000'
occupiedColor:'#ff0000',
radiusR: 4, // 控制灯大小
controlColor: '#1E1E1E', // 控制灯颜色
strokeColor: '#404040',
lineWidth: 3
}
};
this[deviceType.NoStatusLamp] = {
text: {
fontSize: 11,
fontWeight: 'normal',
distance: 5
},
lamp: {
radiusR: 4, // 控制灯大小
controlColor: '#1E1E1E', // 控制灯颜色
strokeColor: '#404040',
lineWidth: 3
}
};
this[deviceType.Counter] = {
fontSize: 11,
defaultColor: '#fff'
};
}
}

View File

@ -331,8 +331,6 @@ class SkinCode extends defaultStyle {
};
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -471,8 +469,8 @@ class SkinCode extends defaultStyle {
core: {
length: 6, // 道岔单边长度
graphShow: true, // 图形显示
graphInversionColor: '#FFFF00', // 反位颜色
graphLocalColor: '#00FF00' // 定位颜色
graphInversionColor: '#FFFF00', // 反位颜色
graphLocalColor: '#00FF00' // 定位颜色
},
jointImg: { // 道岔 A B C D四元素属性配置
trapezoidLength: 8, // 直角梯形元素默认长度
@ -563,8 +561,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -726,7 +722,7 @@ class SkinCode extends defaultStyle {
};
this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {};
this[deviceType.IndicatorLight] = {};
this[deviceType.IndicatorLight] = {};
}
}

View File

@ -328,8 +328,6 @@ class SkinCode extends defaultStyle {
};
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -553,8 +551,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细

View File

@ -377,8 +377,6 @@ class SkinCode extends defaultStyle {
};
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -615,8 +613,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03',
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -821,7 +817,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
fillColor: '#0F0',
fontColor: '#FFF',
rodLength: 90,

View File

@ -444,8 +444,6 @@ class SkinCode extends defaultStyle {
};
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -695,8 +693,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03',
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -911,7 +907,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
fillColor: '#0F0',
fontColor: '#FFF',
rodLength: 90,

View File

@ -451,7 +451,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lamp: {
fill: '#FFFF00', // 填充色
radiusR: 6 // 控制灯大小
@ -499,8 +498,6 @@ class SkinCode extends defaultStyle {
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -615,8 +612,6 @@ class SkinCode extends defaultStyle {
lineColor: '#FFFFFF' // 线条颜色
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -629,8 +624,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AxleReset] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -645,8 +638,6 @@ class SkinCode extends defaultStyle {
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细

View File

@ -489,7 +489,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lamp: {
fill: '#FFFF00', // 填充色
radiusR: 6 // 控制灯大小
@ -537,8 +536,6 @@ class SkinCode extends defaultStyle {
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -623,8 +620,6 @@ class SkinCode extends defaultStyle {
lineColor: '#FFFFFF' // 线条颜色
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -637,8 +632,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AxleReset] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -653,8 +646,6 @@ class SkinCode extends defaultStyle {
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -872,7 +863,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.FloodGate] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lineWidth: 2, // 防淹门描边宽度
spareStrokeColor: '#000', // 打开并锁闭-非打开并锁闭描边颜色
spareFillColor: 'rgba(0, 0, 0, 0)', // 打开并锁闭填充颜色

View File

@ -222,7 +222,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lamp: {
fill: '#f1f1f1', // 填充色
radiusR: 7 // 控制灯大小
@ -270,8 +269,6 @@ class SkinCode extends defaultStyle {
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -625,8 +622,6 @@ class SkinCode extends defaultStyle {
lineColor: '#FFFFFF' // 线条颜色
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细

View File

@ -344,8 +344,6 @@ class SkinCode extends defaultStyle {
};
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -534,7 +532,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.SwitchFault] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 14, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -572,7 +569,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lamp: {
fill: '#FFFF00', // 填充色
radiusR: 6 // 控制灯大小
@ -612,8 +608,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细

View File

@ -435,7 +435,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
spliceShow: true, // 西安二号线特殊显示
lamp: {
fill: '#FFFF00', // 填充色
@ -556,8 +555,6 @@ class SkinCode extends defaultStyle {
};
this[deviceType.AutomaticRoute] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -570,8 +567,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.AxleReset] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -585,8 +580,6 @@ class SkinCode extends defaultStyle {
};
/** 引导总锁 */
this[deviceType.GuideLock] = {
// 是否显示
displayCondition: '03', // 显示条件 prdType
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
@ -607,14 +600,12 @@ class SkinCode extends defaultStyle {
show: false // 车次窗是否显示
};
this[deviceType.NoOneReturn] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
showShape: 'Unmanned', // 显示形状 svg 的Unmanneds
width: 25, // 无人折返宽度
defaultColor: '#9F9C9C', // 默认颜色
activeColor: '#FFFFFF' // 激活颜色
};
this[deviceType.Axle] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lineLength: 14,
lineWidth: 2,
distance: 5,
@ -625,7 +616,6 @@ class SkinCode extends defaultStyle {
resetFillColor: '#FFFF00'
};
this[deviceType.FaultStatusGroup] = { // 故障状态
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
fontSize: 12, // 字体大小
distance: 30, // 模式间距
psd: {
@ -642,7 +632,6 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.ReturnModeGroup] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
insideDistance: 2, // 折返模块边框内部距离
outsideDistance: 10, // 折返模块边框之间距离
rectWidth: 20, // 折返模块宽度
@ -652,7 +641,6 @@ class SkinCode extends defaultStyle {
highlightColor: '#fff' // 高亮颜色
};
this[deviceType.ModeStatusGroup] = { // 车站状态模式
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
fontSize: 12, // 字体大小
distance: 30, // 模式间距
routeMode: {
@ -683,14 +671,12 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.ControlSwitch] = { // 控制开关
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
width: 25,
defaultColor: '#FFFFFF', // 默认颜色
lcwColor: '#FFFF00', // LCW控制颜色
faultColor: '#FF0000' // 故障颜色
};
this[deviceType.LampFilament] = { // 灯丝告警
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
width: 12,
defaultColor: '#9F9C9C', // 默认颜色
warningColor: '#FFFF00' // 告警颜色
@ -810,16 +796,16 @@ class SkinCode extends defaultStyle {
{
type: 1,
lineLShow: false,
arrowLShow: false,
arrowLShow: false,
lineRShow: false,
arrowRShow: true,
arrowRShow: true
},
{
type: 0,
lineLShow: false,
arrowLShow: true,
arrowLShow: true,
lineRShow: false,
arrowRShow: false,
arrowRShow: false
}
], // 列车停止方向类型对应车头显示状态 1从左往右 0从右往左
driveModeStatus: [

View File

@ -152,7 +152,7 @@ deviceRender[deviceType.AtsControl] = {
};
/** CenterCommunication 中心通信表示灯 */
deviceRender[deviceType.CenterCommunication] = {
_type: deviceType.AtsControl,
_type: deviceType.CenterCommunication,
zlevel: 1
};
/** ChainControl 连锁主备状态表示灯 */
@ -287,52 +287,64 @@ deviceRender[deviceType.IndicatorLight] = {
};
/** 接车指示灯 */
deviceRender[deviceType.PickArrow] = {
_type: deviceType.PickArrow,
zlevel: 1
_type: deviceType.PickArrow,
zlevel: 1
};
/** 发车指示灯 */
deviceRender[deviceType.DepartArrow] = {
_type: deviceType.DepartArrow,
zlevel: 1
_type: deviceType.DepartArrow,
zlevel: 1
};
/** 区间占用 区间监控 */
deviceRender[deviceType.SectionOccupied] = {
_type: deviceType.SectionOccupied,
zlevel: 1
_type: deviceType.SectionOccupied,
zlevel: 1
};
/** 辅助状态 */
deviceRender[deviceType.AssistStatus] = {
_type: deviceType.AssistStatus,
zlevel: 1
_type: deviceType.AssistStatus,
zlevel: 1
};
/** 总辅助状态 */
deviceRender[deviceType.TotalAssist] = {
_type: deviceType.TotalAssist,
zlevel: 1
_type: deviceType.TotalAssist,
zlevel: 1
};
/** 发车辅助 */
deviceRender[deviceType.DepartAssist] = {
_type: deviceType.DepartAssist,
zlevel: 1
_type: deviceType.DepartAssist,
zlevel: 1
};
/** 接车辅助 */
deviceRender[deviceType.PickAssist] = {
_type: deviceType.PickAssist,
zlevel: 1
_type: deviceType.PickAssist,
zlevel: 1
};
/** 复原状态灯 */
deviceRender[deviceType.Recovery] = {
_type: deviceType.Recovery,
zlevel: 1
_type: deviceType.Recovery,
zlevel: 1
};
/** 事故状态灯 */
deviceRender[deviceType.Accident] = {
_type: deviceType.Accident,
zlevel: 1
_type: deviceType.Accident,
zlevel: 1
};
/** 闭塞状态灯 */
deviceRender[deviceType.Occlusion] = {
_type: deviceType.Occlusion,
zlevel: 1
_type: deviceType.Occlusion,
zlevel: 1
};
deviceRender[deviceType.ThroatRoute] = {
_type: deviceType.ThroatRoute,
zlevel: 1
};
deviceRender[deviceType.NoStatusLamp] = {
_type: deviceType.NoStatusLamp,
zlevel: 1
};
deviceRender[deviceType.Counter] = {
_type: deviceType.Counter,
zlevel: 1
};
export default deviceRender;

View File

@ -60,6 +60,9 @@ const deviceType = {
DepartAssist: 'DepartAssist',
TotalAssist: 'TotalAssist',
AssistStatus: 'AssistStatus',
SectionOccupied: 'SectionOccupied'
SectionOccupied: 'SectionOccupied',
ThroatRoute: 'ThroatRoute',
NoStatusLamp: 'NoStatusLamp',
Counter: 'Counter'
};
export default deviceType;

View File

@ -24,6 +24,7 @@ class Status {
assignSkip: device.assignSkip, // 是否指定跳停
runLevelTime: device.runLevelTime, // 区间运行时间 自动为 0
parkingTime: device.parkingTime, // 站台停车时间 自动为0
remainTime:device.remainTime, // 当前剩余停站时间
fault: device.fault, /** 非故障*/
num:device.num
};
@ -95,6 +96,7 @@ class Status {
offsetp:device.offsetp, /** 列车精确位置 (成都一号线使用)*/
physicalCode:device.physicalCode, /** 列车所在物理区段 */
num:device.num /** 列车上的人数*/
// parkingRemainTime
};
}
handleStation(device) {

View File

@ -203,6 +203,7 @@ class Jlmap {
}
setCenterWithOffset(deviceCode, dx, offsetY) {
console.log('setCenterWithOffset');
const arr = Object.keys(this.mapDevice);
if (arr.length != 0) {
const device = this.mapDevice[deviceCode];

View File

@ -1,26 +1,29 @@
class Options {
constructor(opts, trigger) {
this.scaleIndex = 0;
this.scaleList = [
0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,
1, 1.2, 1.4, 1.6, 1.8,
2, 2.2, 2.4, 2.6, 2.8,
3, 3.2, 3.4, 3.6, 3.8,
4, 4.2, 4.4, 4.6, 4.8,
5, 5.2, 5.4, 5.6, 5.8,
6, 6.2, 6.4, 6.6, 6.8,
7, 7.2, 7.4, 7.6, 7.8,
8
];
// this.scaleList = [
// 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,
// 1, 1.2, 1.4, 1.6, 1.8,
// 2, 2.2, 2.4, 2.6, 2.8,
// 3, 3.2, 3.4, 3.6, 3.8,
// 4, 4.2, 4.4, 4.6, 4.8,
// 5, 5.2, 5.4, 5.6, 5.8,
// 6, 6.2, 6.4, 6.6, 6.8,
// 7, 7.2, 7.4, 7.6, 7.8,
// 8
// ];
this.minScale = 0.1;
this.maxScale = 10;
if (Number.isFinite(opts.scaleRate)) {
const idx = this.scaleList.indexOf(opts.scaleRate);
// const idx = this.scaleList.indexOf(opts.scaleRate);
const idx = opts.scaleRate * 20;
if (idx >= 0) {
this.scaleIndex = idx;
}
}
this.scaleRate = opts.scaleRate || this.scaleList[this.scaleIndex]; // 缩放比例
this.scaleRate = opts.scaleRate || this.scaleIndex * 0.05; // 缩放比例
this.offsetX = opts.offsetX || 0; // x偏移
@ -56,16 +59,19 @@ class Options {
if (Number.isFinite(payload.scale)) {
if (Number.isFinite(payload.scale)) {
if ((this.scaleIndex + payload.scale) >= 0 && (this.scaleIndex + payload.scale) < this.scaleList.length) {
this.scaleIndex = this.scaleIndex + payload.scale;
// if ((this.scaleIndex + payload.scale) >= 0 && (this.scaleIndex + payload.scale) < this.scaleList.length) {
// this.scaleIndex = this.scaleIndex + payload.scale;
// }
if ((payload.scale + this.scaleIndex >= 2) && (payload.scale + this.scaleIndex <= 200)) {
this.scaleIndex = payload.scale + this.scaleIndex;
}
}
this.scaleRate = this.scaleList[this.scaleIndex];
this.scaleRate = (this.scaleIndex * 0.05).toFixed(2);
}
if (Number.isFinite(payload.scaleRate)) {
const idx = this.scaleList.indexOf(payload.scaleRate);
if (idx < 0) {
const idx = payload.scaleRate * 20;
if (idx < 2 || idx > 200) {
return;
}
this.scaleIndex = idx;
@ -89,11 +95,11 @@ class Options {
getScaleRate(scale) {
if (Number.isFinite(scale)) {
if ((this.scaleIndex + scale) >= 0 && (this.scaleIndex + scale) < this.scaleList.length) {
return this.scaleList[this.scaleIndex + scale];
if (( scale + this.scaleIndex) >= 2 && (scale + this.scaleIndex) <= 200) {
return ((scale + this.scaleIndex) * 0.05).toFixed(2);
}
}
return this.scaleList[this.scaleIndex];
return (this.scaleIndex * 0.05).toFixed(2);
}
}

View File

@ -359,6 +359,9 @@ export function updateMapData(state, model) {
case deviceType.TotalAssist: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.AssistStatus: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.SectionOccupied: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.ThroatRoute: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.NoStatusLamp: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.Counter: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.SplitStation: updateForList(model, state, 'splitStationList'); break;
case deviceType.Arrow: updateForList(model, state, 'arrowList'); break;
case deviceType.Power: updateForList(model, state, 'powerLineList'); break;

View File

@ -0,0 +1,57 @@
import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text';
export default class ECounter extends Group {
constructor(model) {
super();
this.model = model;
this.zlevel = model.zlevel;
this._subType = model._subType;
this.z = model.z;
this.onmouseover = model.mouseover;
this.onmouseout = model.mouseout;
this.create(model);
}
create(model) {
const style = model.style;
this.counter = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x,
y: model.y,
fontWeight: style.textStyle.fontWeight,
fontSize: style.Counter.fontSize,
fontFamily: style.fontFamily,
text: '000',
textFill: style.Counter.defaultColor,
textAlign: style.textStyle.textAlign,
textVerticalAlign: style.textStyle.textVerticalAlign
}
});
this.name = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x,
y: model.y + 20,
fontWeight: style.textStyle.fontWeight,
fontSize: style.Counter.fontSize,
fontFamily: style.fontFamily,
text: model.text,
textFill: style.Counter.defaultColor,
textAlign: style.textStyle.textAlign,
textVerticalAlign: style.textStyle.textVerticalAlign
}
});
this.add(this.counter);
this.add(this.name);
}
recover() {
}
show() {}
setCount(count) {
this.counter && this.counter.setStyle({ text: count || '000' });
}
}

View File

@ -11,6 +11,7 @@ import EUnmanned from './EUnmanned';
import EAxle from './EAxle';
import EIndicatorLight from './EIndicatorLight';
import EPickOrDepartArrow from './EPickOrDepartArrow';
import ECounter from './ECounter';
import store from '@/store/index';
export default class SaidLamp extends Group {
@ -39,7 +40,8 @@ export default class SaidLamp extends Group {
create() {
const model = this.model;
const lampDevice = ['LeuControl', 'IntersiteControl', 'CenterCommunication', 'AtsControl', 'LocalControl', 'ChainControl', 'Maintain',
'PowerSupply', 'MaintenanceLamps', 'ZcCommunication', 'SwitchFault', 'SectionOccupied', 'AssistStatus', 'TotalAssist', 'TotalAssist', 'PickAssist', 'Recovery', 'Accident', 'Occlusion'];
'PowerSupply', 'MaintenanceLamps', 'ZcCommunication', 'SwitchFault', 'SectionOccupied', 'AssistStatus', 'TotalAssist', 'TotalAssist', 'PickAssist', 'Recovery',
'Accident', 'Occlusion', 'ThroatRoute', 'NoStatusLamp'];
if (lampDevice.includes(this._type)) {
this.control = new EControl({
@ -198,6 +200,17 @@ export default class SaidLamp extends Group {
_subType: this._type
});
this.add(this.control);
} else if (this._type === 'Counter' && this.style.Counter) {
this.control = new ECounter({
zlevel: this.zlevel,
z: this.z,
x: this.computedPosition.x,
y: this.computedPosition.y,
text: model.name,
style: this.style,
_subType: this._type
});
this.add(this.control);
}
}
@ -286,6 +299,11 @@ export default class SaidLamp extends Group {
}
}
}
setCount(count) {
if (this.model._type === deviceType.Counter) {
this.control && this.control.setCount(count);
}
}
recover() {
this.control && this.control.show();
this.control && this.control.recover();

View File

@ -1,4 +1,6 @@
import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text';
import Arc from 'zrender/src/graphic/shape/Arc';
import ETextName from './ETextName'; // 名称文字
import ELimitLines from './ELimitLines'; // 区段限速 (私有)
import ELines from './ELines'; // 创建多线条 曲线 (私有)
@ -132,6 +134,53 @@ export default class Section extends Group {
});
this.add(this[element]);
});
if (this.style.Section.remainTime && this.model.type == '01' && this.model.hasStopCD) {
const stopCDPosition = this.model.stopCDPosition || {x:0, y:0};
const computedPoints = this.computedPoints;
const drict = model.trainPosType != '01' ? 1 : -1;
const x = Math.min(computedPoints[0].x, computedPoints[computedPoints.length - 1].x) + Math.abs(computedPoints[computedPoints.length - 1].x - computedPoints[0].x) / 2;
const y = Math.min(computedPoints[0].y, computedPoints[computedPoints.length - 1].y) + Math.abs(computedPoints[computedPoints.length - 1].y - computedPoints[0].y) / 2;
this.remainTimeText = new Text({
_subType: 'remainTimeText',
zlevel: this.zlevel,
z: this.z,
silent: model.silent || false,
style: {
x: x + stopCDPosition.x,
y: y - 23 * drict + stopCDPosition.y,
fontWeight: 'normal',
fontSize: 13,
fontFamily:style.fontFamily,
text: '0',
textFill:'#ff0000',
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
}
});
this.remainTimeCircle = new Arc({
_subType: 'remainTimeCircle',
zlevel: this.zlevel,
z: this.z,
shape: {
cx: x - 18 + stopCDPosition.x,
cy: y - 23 * drict + stopCDPosition.y,
r: 6
},
style: {
lineWidth: 1,
fill: style.backgroundColor,
stroke: '#ffffff'
}
});
this.add(this.remainTimeText);
this.add(this.remainTimeCircle);
// this.remainTimeCircle.hide();
const path = window.location.href;
if (!path.includes('/map/draw')) { // 公里标是否显示
this.remainTimeText.hide();
}
}
}
}
@ -167,6 +216,8 @@ export default class Section extends Group {
this.speedLimitName && this.speedLimitName.hide();
this.separator && this.separator.show();
this.badShunt && this.badShunt.hide();
// this.remainTimeText && this.remainTimeText.hide();
// this.remainTimeCircle && this.remainTimeCircle.hide();
this.axle && this.axle.setStyle({
stroke: this.style.Section.line.spareColor,
@ -544,6 +595,15 @@ export default class Section extends Group {
// 分路不良
// model.shuntingTypeList.length > 0 &&
model.badShunt && this.badShuntStatus();
// 停车倒计时
if (this.remainTimeText) {
if (model.stopCountDown) {
this.showRemainTime(model.stopCountDown);
} else {
this.hideRemainTime();
}
}
}
}
@ -655,4 +715,22 @@ export default class Section extends Group {
y:rect.y
};
}
showRemainTime(remainTime) {
this.remainTimeText.show();
// this.remainTimeCircle.show();
this.remainTimeCircle && this.remainTimeCircle.animateStyle(true)
.when(0, { fill:this.style.backgroundColor })
.when(1000, { fill: '#ffffff' })
.when(2000, { fill:this.style.backgroundColor })
.start();
this.remainTimeText.setStyle('text', remainTime);
}
hideRemainTime() {
this.remainTimeText.hide();
this.remainTimeCircle && this.remainTimeCircle.stopAnimation(true);
// this.remainTimeCircle && this.remainTimeCircle.hide();
}
}

View File

@ -174,7 +174,11 @@ class ESigLamp extends Group {
}
setColor(color) {
if (this.model.style.Signal.lamp.borderVariable) {
this.lamp.setStyle({ fill: color, stroke: color });
if (this.model.style.Signal.lamp.normalBorderShow && color == this.model.style.backgroundColor) {
this.lamp.setStyle({ fill: color });
} else {
this.lamp.setStyle({ fill: color, stroke: color });
}
} else {
this.lamp.setStyle({ fill: color });
}

View File

@ -647,7 +647,6 @@ class Signal extends Group {
}
this.sigPost.setHorColor(this.style.Signal.post.openHorColor);
}
}
/* 侧向开放 */
openLateral(logicLight) {
@ -726,6 +725,14 @@ class Signal extends Group {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.greenColor);
}
redFlash() {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor);
this.lamps[0].setAnimationStart(this.style.Signal.lamp.redColor);
}
blueFlash() {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
this.lamps[0].setAnimationStart(this.style.Signal.lamp.blueColor);
}
lampWhite() {
if (this.lamps.length === 1) {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.whiteColor);
@ -946,12 +953,12 @@ class Signal extends Group {
showRemainTime(number) {
this.remainTimeName.show();
this.remainTimeName && this.remainTimeName.setStyle({ text: number });
this.model.signalButtonList && this.model.signalButtonList.length && this.model.signalButtonList.forEach(item => {
const button = store.getters['map/getDeviceByCode'](item);
if (button.type === 'PICK') {
button && button.instance && button.instance.startAnimate();
}
});
// this.model.signalButtonList && this.model.signalButtonList.length && this.model.signalButtonList.forEach(item => {
// const button = store.getters['map/getDeviceByCode'](item);
// if (button.type === 'PICK') {
// button && button.instance && button.instance.startAnimate();
// }
// });
if (this.model.type === 'SHUNTING') {
if (!this.style.Signal.dtTextNearSignalOffset) {
this.sigName && this.sigName.setAnimationStart(this.style.Signal.text.defaultColor);
@ -1086,6 +1093,14 @@ class Signal extends Group {
this.greenYellow();
break;
}
case 'RF': {
this.redFlash();
break;
}
case 'BF': {
this.blueFlash();
break;
}
default: {
this.close(model.logicLight); // 信号关闭
break;
@ -1104,6 +1119,14 @@ class Signal extends Group {
}
});
}
if (model.lockedRouteCode) {
this.model.signalButtonList && this.model.signalButtonList.length && this.model.signalButtonList.forEach(item => {
const button = store.getters['map/getDeviceByCode'](item);
if (button.type === 'GUIDE') {
button && button.instance && button.instance.setState({ toSelected: 0, type: button.model, pressDown: button.pressDown });
}
});
}
/** 信号机封锁 */ // 缺一个功能封锁
model.blockade && this.block(); // 因大铁处理信号按钮状态 封锁处理需在延时解锁时间之后处理
model.overlapLock && this.overlapLock();

View File

@ -1,333 +1,443 @@
import Group from 'zrender/src/container/Group'
import Rect from 'zrender/src/graphic/shape/Rect'
import Line from 'zrender/src/graphic/shape/Line'
import Text from 'zrender/src/graphic/Text'
import Arc from 'zrender/src/graphic/shape/Arc'
import Circle from 'zrender/src/graphic/shape/Circle'
import store from '@/store/index'
import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect';
import Line from 'zrender/src/graphic/shape/Line';
import Text from 'zrender/src/graphic/Text';
// import Arc from 'zrender/src/graphic/shape/Arc';
import Circle from 'zrender/src/graphic/shape/Circle';
import store from '@/store/index';
const typeList = [
'PICK_ASSIST',
'DEPART_ASSIST',
'ASSIST',
'GUIDELOCK',
'SECTION_FAULT_UNLOCK',
'LOCATE',
'REVERSE',
'CANCEL',
'HUMAN_RELEASE_ROUTE',
'MONOLOCK',
'UNLOCK',
'BLOCK',
'UNBLOCK',
'CHANGE_DIRECTION'
]
'PICK_ASSIST',
'DEPART_ASSIST',
'ASSIST',
'GUIDELOCK',
'SECTION_FAULT_UNLOCK',
'LOCATE',
'REVERSE',
'CANCEL',
'HUMAN_RELEASE_ROUTE',
'MONOLOCK',
'UNLOCK',
'BLOCK',
'UNBLOCK',
'CHANGE_DIRECTION',
'ACCIDENT',
'RECOVERY',
'OCCLUSION',
'FAULT_NOTICE'
];
export default class SignalButton extends Group {
constructor(model, { style }) {
super()
this._code = model.code
this._type = model._type
this.zlevel = model.zlevel
const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code)
if (pictureDevice) {
this.computedPosition = pictureDevice.position
} else {
this.computedPosition = model.position
}
this.z = 0
this.model = model
this.style = style
this.pressed = false
// Line
this.create()
this.setState(model)
}
create() {
const model = this.model
const computedPosition = this.computedPosition
const fillColor = this.getTypeColor()
if (this.style.SignalButton && this.style.SignalButton.shape === 'roundWithDock' && typeList.includes(model.type)) {
const circle1 = new Circle({
zlevel: this.zlevel,
z: this.z + 2,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 7,
r: 7
},
style: {
stroke: '#69666E',
lineWidth: 1,
fill: fillColor
}
})
const circle2 = new Circle({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 9,
r: 8
},
style: {
fill: '#000'
}
})
const circle3 = new Circle({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 9,
r: 9
},
style: {
fill: '#eee'
}
})
this.arcShape = circle1
this.arcShapeDock1 = circle2
this.arcShapeDock2 = circle3
this.add(circle1)
.add(circle2)
.add(circle3)
} else {
this.rectButton = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: computedPosition.x,
y: computedPosition.y,
width: 14,
height: 14
},
style: {
lineDash: null,
stroke: '#69666E',
lineWidth: 1,
fill: fillColor
}
})
this.add(this.rectButton)
}
this.leftLine = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x + 1,
y1: computedPosition.y + 1,
x2: computedPosition.x + 13,
y2: computedPosition.y + 13
},
style: {
lineWidth: 2,
stroke: '#ff0000'
}
})
this.add(this.leftLine)
this.leftLine.hide()
this.rightLine = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x + 13,
y1: computedPosition.y + 1,
x2: computedPosition.x + 1,
y2: computedPosition.y + 13
},
style: {
lineWidth: 2,
stroke: '#ff0000'
}
})
this.add(this.rightLine)
this.rightLine.hide()
this.leftBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x - 1,
y1: computedPosition.y - 1,
x2: computedPosition.x - 1,
y2: computedPosition.y + 15
},
style: {
lineWidth: 2,
stroke: '#FFFFFF'
}
})
this.add(this.leftBoard)
this.leftBoard.hide()
this.topBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x - 1,
y1: computedPosition.y - 1,
x2: computedPosition.x + 15,
y2: computedPosition.y - 1
},
style: {
lineWidth: 2,
stroke: '#FFFFFF'
}
})
this.add(this.topBoard)
this.topBoard.hide()
this.rightBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x + 15,
y1: computedPosition.y - 1,
x2: computedPosition.x + 15,
y2: computedPosition.y + 15
},
style: {
lineWidth: 2,
stroke: '#A0A0A0'
}
})
this.add(this.rightBoard)
this.rightBoard.hide()
this.bottomBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x - 1,
y1: computedPosition.y + 15,
x2: computedPosition.x + 15,
y2: computedPosition.y + 15
},
style: {
lineWidth: 2,
stroke: '#A0A0A0'
}
})
this.add(this.bottomBoard)
this.bottomBoard.hide()
const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION']
if (hasTextList.includes(model.type) || (this.style.SignalButton && this.style.SignalButton.showName)) {
this.buttonText = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: computedPosition.x + model.nameOffset.x,
y: computedPosition.y + model.nameOffset.y,
fontWeight: '400',
fontSize: 10,
fontFamily: '',
text: model.name,
textFill: '#C0C0C0',
textAlign: 'middle',
textVerticalAlign: 'top'
}
})
this.add(this.buttonText)
}
}
startAnimate() {
this.rectButton &&
this.rectButton
.animateStyle(true)
.when(0, { fill: '#000' })
.when(1000, { fill: this.getTypeColor() })
.when(2000, { fill: '#000' })
.start()
}
stopAnimation() {
this.rectButton && this.rectButton.stopAnimation(true)
// this.arcFlash && this.arcFlash.stopAnimation(false);
}
getTypeColor() {
if (this.style.SignalButton && this.style.SignalButton.fillColor && typeList.includes(this.model.type)) {
return this.style.SignalButton.fillColor
}
let color = ''
const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION']
if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') {
color = '#808080'
} else if (this.model.type === 'GUIDE') {
color = '#5050E1'
} else if (list.includes(this.model.type)) {
color = '#ccc'
} else {
color = '#008000'
}
return color
} //
recover() {
this.stopAnimation()
this.rectButton && this.rectButton.setStyle({ fill: this.getTypeColor() })
this.arcShape && this.arcShape.setStyle({ fill: this.getTypeColor() })
this.rightLine && this.rightLine.hide()
this.leftLine && this.leftLine.hide()
this.rectButton && this.rectButton.show()
this.arcShape && this.arcShape.show()
this.arcShapeDock1 && this.arcShapeDock1.show()
this.arcShapeDock2 && this.arcShapeDock2.show()
this.buttonText && this.buttonText.show()
this.leftBoard && this.leftBoard.hide()
this.rightBoard && this.rightBoard.hide()
this.topBoard && this.topBoard.hide()
this.bottomBoard && this.bottomBoard.hide()
}
blockShow() {
this.rightLine && this.rightLine.show()
this.leftLine && this.leftLine.show()
}
setState(model) {
this.recover()
// { value: 'ASSIST', label: '总辅助按钮' },
// { value: 'PICK_ASSIST', label: '接辅助按钮' },
// { value: 'DEPART_ASSIST', label: '发辅助按钮' },
const list = ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION']
if (list.includes(model.type)) {
if (this.rectButton) {
if (model.pressDown) {
this.rectButton.setStyle({ fill: '#FFFF00' })
constructor(model, { style }) {
super();
this._code = model.code;
this._type = model._type;
this.zlevel = model.zlevel;
const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code);
if (pictureDevice) {
this.computedPosition = pictureDevice.position;
} else {
this.rectButton.setStyle({ fill: this.getTypeColor() })
this.computedPosition = model.position;
}
}
this.z = 10;
this.model = model;
this.style = style;
this.pressed = false;
this.typeList = this.style.SignalButton.typeList || typeList;
// Line
this.create();
this.setState(model);
}
// { value: 'PICK', label: '接车按钮' },
// { value: 'SHUNT_TERMINAL', label: '调车终端按钮' },
if (!store.getters['map/checkDeviceShow'](this._code)) {
this.buttonText && this.buttonText.hide()
this.rectButton && this.rectButton.hide()
this.leftLine && this.leftLine.hide()
this.rightLine && this.rightLine.hide()
this.arcShape && this.arcShape.hide()
this.arcShapeDock1 && this.arcShapeDock1.hide()
this.arcShapeDock2 && this.arcShapeDock2.hide()
} else {
if (model.hasSelected) {
this.startAnimate()
}
}
}
pressDown(flg, color) {
if (this.pressed === flg) return
if (this.arcShapeDock1) {
if (flg) {
this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy + 2 }, z: this.z + 2, zlevel: this.zlevel })
if (color) {
this.arcShape
.animateStyle(true)
.when(0, { fill: '#69666E' })
.when(1000, { fill: color })
.when(2000, { fill: '#69666E' })
.start()
create() {
const model = this.model;
const computedPosition = this.computedPosition;
const fillColor = this.getTypeColor();
if (this.style.SignalButton && this.style.SignalButton.shape === 'roundWithDock' && this.typeList.includes(model.type)) {
const circle1 = new Circle({
zlevel: this.zlevel,
z: this.z + 2,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 7,
r: 7
},
style: {
stroke: '#69666E',
lineWidth: 1,
fill: fillColor
}
});
const circle2 = new Circle({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 9,
r: 8
},
style: {
fill: '#000'
}
});
const circle3 = new Circle({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 9,
r: 9
},
style: {
fill: '#eee'
}
});
this.arcShape = circle1;
this.arcShapeDock1 = circle2;
this.arcShapeDock2 = circle3;
this.add(circle1)
.add(circle2)
.add(circle3);
} else {
const width = this.style.SignalButton && this.style.SignalButton.width ? this.style.SignalButton.width : 14;
this.rectButton = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: computedPosition.x,
y: computedPosition.y,
width:width,
height: width
},
style: {
lineDash: null,
stroke: '#69666E',
lineWidth: 1,
fill: fillColor
}
});
if (this.style.SignalButton && this.style.SignalButton.strokeColor) {
this.rectButton.setStyle('stroke', this.style.SignalButton.strokeColor);
}
this.add(this.rectButton);
}
const width = this.style.SignalButton && this.style.SignalButton.width ? this.style.SignalButton.width : 14;
this.leftLine = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x + 1,
y1: computedPosition.y + 1,
x2: computedPosition.x + width - 1,
y2: computedPosition.y + width - 1
},
style: {
lineWidth: 2,
stroke: '#ff0000'
}
});
this.add(this.leftLine);
this.leftLine.hide();
this.rightLine = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x + width - 1,
y1: computedPosition.y + 1,
x2: computedPosition.x + 1,
y2: computedPosition.y + width - 1
},
style: {
lineWidth: 2,
stroke: '#ff0000'
}
});
this.add(this.rightLine);
this.rightLine.hide();
const borderLine = this.style.SignalButton && this.style.SignalButton.borderLine ? this.style.SignalButton.borderLine : 2;
const isShowBorder = this.style.SignalButton && this.style.SignalButton.isShowBorder;
// 接车按钮 通过按钮 引导按钮
const showBorderBtn = ['PICK', 'PASS', 'GUIDE', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION', 'FLEXIBLE'];
this.leftBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x - (borderLine - 1),
y1: computedPosition.y - (borderLine - 1),
x2: computedPosition.x - (borderLine - 1),
y2: computedPosition.y + width + (borderLine - 1)
},
style: {
lineWidth: borderLine,
stroke: '#FFFFFF'
}
});
this.add(this.leftBoard);
if (!(isShowBorder && showBorderBtn.includes(model.type))) { this.leftBoard.hide(); }
this.topBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x - (borderLine - 1),
y1: computedPosition.y - (borderLine - 1),
x2: computedPosition.x + width + (borderLine - 1),
y2: computedPosition.y - (borderLine - 1)
},
style: {
lineWidth: borderLine,
stroke: '#FFFFFF'
}
});
this.add(this.topBoard);
if (!(isShowBorder && showBorderBtn.includes(model.type))) { this.topBoard.hide(); }
this.rightBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x + width + (borderLine - 1),
y1: computedPosition.y - (borderLine - 1),
x2: computedPosition.x + width + (borderLine - 1),
y2: computedPosition.y + width + (borderLine - 1)
},
style: {
lineWidth: borderLine,
stroke: '#A0A0A0'
}
});
this.add(this.rightBoard);
if (!(isShowBorder && showBorderBtn.includes(model.type))) { this.rightBoard.hide(); }
this.bottomBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x - (borderLine - 1),
y1: computedPosition.y + width + (borderLine - 1),
x2: computedPosition.x + width + (borderLine - 1),
y2: computedPosition.y + width + (borderLine - 1)
},
style: {
lineWidth: borderLine,
stroke: '#A0A0A0'
}
});
this.add(this.bottomBoard);
if (!(isShowBorder && showBorderBtn.includes(model.type))) { this.bottomBoard.hide(); }
const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION', 'FAULT_NOTICE'];
if (hasTextList.includes(model.type) || (this.style.SignalButton && this.style.SignalButton.showName)) {
this.buttonText = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: computedPosition.x + model.nameOffset.x,
y: computedPosition.y + model.nameOffset.y,
fontWeight: '400',
fontSize: 10,
fontFamily: '',
text: model.name,
textFill: '#C0C0C0',
textAlign: 'middle',
textVerticalAlign: 'top'
}
});
this.add(this.buttonText);
}
if (model.hasCount) {
const countOffset = { x: 0, y: 0 };
if (this.style.SignalButton && this.style.SignalButton.countOffset) {
countOffset.x = this.style.SignalButton.countOffset.x;
countOffset.y = this.style.SignalButton.countOffset.y;
}
this.textCount = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: computedPosition.x + 7 + countOffset.x,
y: computedPosition.y + countOffset.y,
fontWeight: '400',
fontSize: 10,
fontFamily: '',
text: '000',
textFill: '#C0C0C0',
textAlign: 'middle',
textVerticalAlign: 'top'
}
});
this.add(this.textCount);
}
} else {
this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy - 2 }, z: this.z + 2, zlevel: this.zlevel })
this.arcShape.stopAnimation(true)
this.recover()
}
this.pressed = flg
}
}
getAnchorPoint() {}
startAnimate(color) {
this.rectButton &&
this.rectButton
.animateStyle(true)
.when(0, { fill: '#000' })
.when(1000, { fill: color })
.when(2000, { fill: '#000' })
.start();
}
stopAnimation() {
this.rectButton && this.rectButton.stopAnimation(true);
}
getTypeColor() {
if (this.style.SignalButton && this.style.SignalButton.fillColor && this.typeList.includes(this.model.type)) {
return this.style.SignalButton.fillColor;
}
let color = '';
const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION', 'FAULT_NOTICE'];
if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') {
color = '#808080';
} else if (this.model.type === 'GUIDE') {
if (this.style.SignalButton && this.style.SignalButton.guideColor) {
color = this.style.SignalButton.guideColor;
} else {
color = '#5050E1';
}
} else if (list.includes(this.model.type)) {
color = '#ccc';
} else {
if (this.style.SignalButton && this.style.SignalButton.trainColor) {
color = this.style.SignalButton.trainColor;
} else {
color = '#008000';
}
}
return color;
}
recover() {
this.stopAnimation();
this.rectButton && this.rectButton.setStyle({ fill: this.getTypeColor() });
this.arcShape && this.arcShape.setStyle({ fill: this.getTypeColor() });
this.rightLine && this.rightLine.hide();
this.leftLine && this.leftLine.hide();
this.rectButton && this.rectButton.show();
this.arcShape && this.arcShape.show();
this.arcShapeDock1 && this.arcShapeDock1.show();
this.arcShapeDock2 && this.arcShapeDock2.show();
this.buttonText && this.buttonText.show();
// this.leftBoard && this.leftBoard.hide();
// this.rightBoard && this.rightBoard.hide();
// this.topBoard && this.topBoard.hide();
// this.bottomBoard && this.bottomBoard.hide();
}
blockShow() {
this.rightLine && this.rightLine.show();
this.leftLine && this.leftLine.show();
}
setState(model) {
this.recover();
// { value: 'ASSIST', label: '总辅助按钮' },
// { value: 'PICK_ASSIST', label: '接辅助按钮' },
// { value: 'DEPART_ASSIST', label: '发辅助按钮' },
const isShowBorder = this.style.SignalButton && this.style.SignalButton.isShowBorder;
const list = ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION'];
if (list.includes(model.type)) {
if (this.rectButton) {
if (model.pressDown) {
this.rectButton.setStyle({ fill: '#FFFF00' });
if (isShowBorder) {
this.leftBoard && this.leftBoard.setStyle('stroke', '#A0A0A0');
this.topBoard && this.topBoard.setStyle('stroke', '#A0A0A0');
this.rightBoard && this.rightBoard.setStyle('stroke', '#FFFFFF');
this.bottomBoard && this.bottomBoard.setStyle('stroke', '#FFFFFF');
}
} else {
this.rectButton.setStyle({ fill: this.getTypeColor() });
if (isShowBorder) {
this.leftBoard && this.leftBoard.setStyle('stroke', '#FFFFFF');
this.topBoard && this.topBoard.setStyle('stroke', '#FFFFFF');
this.rightBoard && this.rightBoard.setStyle('stroke', '#A0A0A0');
this.bottomBoard && this.bottomBoard.setStyle('stroke', '#A0A0A0');
this.leftBoard && this.leftBoard.show();
this.rightBoard && this.rightBoard.show();
this.topBoard && this.topBoard.show();
this.bottomBoard && this.bottomBoard.show();
}
}
}
}
if (isShowBorder) {
if (model.type == 'FLEXIBLE') {
this.leftBoard && this.leftBoard.show();
this.rightBoard && this.rightBoard.show();
this.topBoard && this.topBoard.show();
this.bottomBoard && this.bottomBoard.show();
}
}
// 接车按钮 通过按钮 引导按钮
const showBorderBtn = ['PICK', 'PASS', 'GUIDE'];
if (isShowBorder && showBorderBtn.includes(model.type)) {
if (this.rectButton) {
if (model.hasSelected || model.pressDown) {
this.leftBoard && this.leftBoard.setStyle('stroke', '#A0A0A0');
this.topBoard && this.topBoard.setStyle('stroke', '#A0A0A0');
this.rightBoard && this.rightBoard.setStyle('stroke', '#FFFFFF');
this.bottomBoard && this.bottomBoard.setStyle('stroke', '#FFFFFF');
} else {
this.leftBoard && this.leftBoard.setStyle('stroke', '#FFFFFF');
this.topBoard && this.topBoard.setStyle('stroke', '#FFFFFF');
this.rightBoard && this.rightBoard.setStyle('stroke', '#A0A0A0');
this.bottomBoard && this.bottomBoard.setStyle('stroke', '#A0A0A0');
this.leftBoard && this.leftBoard.show();
this.rightBoard && this.rightBoard.show();
this.topBoard && this.topBoard.show();
this.bottomBoard && this.bottomBoard.show();
}
// else if (model.hasSelected && (model.type == 'PICK' || model.type == 'PASS')) {
// this.leftBoard && this.leftBoard.setStyle('stroke', '#A0A0A0');
// this.topBoard && this.topBoard.setStyle('stroke', '#A0A0A0');
// this.rightBoard && this.rightBoard.setStyle('stroke', '#FFFFFF');
// this.bottomBoard && this.bottomBoard.setStyle('stroke', '#FFFFFF');
}
}
// { value: 'PICK', label: '接车按钮' },
// { value: 'SHUNT_TERMINAL', label: '调车按钮' },
if (!store.getters['map/checkDeviceShow'](this._code)) {
this.buttonText && this.buttonText.hide();
this.rectButton && this.rectButton.hide();
this.leftLine && this.leftLine.hide();
this.rightLine && this.rightLine.hide();
this.arcShape && this.arcShape.hide();
this.arcShapeDock1 && this.arcShapeDock1.hide();
this.arcShapeDock2 && this.arcShapeDock2.hide();
this.leftBoard && this.leftBoard.hide();
this.rightBoard && this.rightBoard.hide();
this.topBoard && this.topBoard.hide();
this.bottomBoard && this.bottomBoard.hide();
} else {
if (model.hasSelected) {
if (this.style.SignalButton && this.style.SignalButton.selectColor) {
this.rectButton && this.rectButton.setStyle({fill:this.style.SignalButton.selectColor});
} else {
this.startAnimate(this.getTypeColor());
}
} else if (model.toSelected) {
this.startAnimate(this.style.SignalButton.flashingColor);
}
}
}
setCount(count) {
this.textCount && this.textCount.setStyle({text: count || '000'});
}
pressDown(flg, color) {
if (this.pressed === flg) return;
if (this.arcShapeDock1) {
if (flg) {
this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy + 2 }, z: this.z + 2, zlevel: this.zlevel });
if (color) {
this.arcShape
.animateStyle(true)
.when(0, { fill: '#69666E' })
.when(1000, { fill: color })
.when(2000, { fill: '#69666E' })
.start();
}
} else {
this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy - 2 }, z: this.z + 2, zlevel: this.zlevel });
this.arcShape.stopAnimation(true);
this.recover();
}
this.pressed = flg;
}
}
getAnchorPoint() {}
}

View File

@ -13,11 +13,13 @@ import { arrow } from '../utils/ShapePoints';
import Rect from 'zrender/src/graphic/shape/Rect';
import Text from 'zrender/src/graphic/Text';
import store from '@/store/index';
import Line from 'zrender/src/graphic/shape/Line';
import EStationText from './EStationText';
import { traverseLineElements } from '../utils/ShapeStatusCovert';
import Vue from 'vue';
import Circle from 'zrender/src/graphic/shape/Circle';
export default class Station extends Group {
constructor(model, {style}) {
@ -90,13 +92,6 @@ export default class Station extends Group {
this.add(this.mileageText);
}
// if (!model.visible) { // 隐藏车站
// // this.subheadText && this.subheadText.setStyle('textFill', 'rgba(0,0,0,0)');
// // this.mileageText && this.mileageText.setStyle('textFill', 'rgba(0,0,0,0)');
// // this.stationText && this.stationText.setStyle('textFill', 'rgba(0,0,0,0)');
// this.eachChild(elem => { elem.hide(); });
// }
}
createTurnBack() { // 创建按图折返
const model = this.model;
@ -167,7 +162,7 @@ export default class Station extends Group {
const queryCtc = queryList.find(item => {
return item.includes('ctc');
});
if (queryCtc) {
if (queryCtc && model.createControlMode) {
this.createCtcControlMode();
} else if (this.style.Station.StationControl.special) {
if (model.visible && model.createControlMode) { // model.createControlMode 控制模式
@ -355,7 +350,7 @@ export default class Station extends Group {
zlevel: this.zlevel,
z: this.z,
style: {
x: computedControlModePoint.x + this.style.Station.StationControl.text.offsetX * 0,
x: computedControlModePoint.x + this.style.Station.StationControl.text.offsetX,
y: computedControlModePoint.y + this.style.Station.StationControl.text.offsetY,
fontWeight: this.style.Station.StationControl.text.fontWeight,
fontSize: this.style.Station.StationControl.text.fontSize,
@ -450,7 +445,6 @@ export default class Station extends Group {
}
}
createSelfDiscipline() {
// const model = this.model;
const computedControlModePoint = this.computedControlModePoint;
if (this.style.Station.StationControl.selfDiscipline) {
this.selfDiscipline = new ESingleControl({
@ -467,7 +461,7 @@ export default class Station extends Group {
});
this.add(this.selfDiscipline);
}
if (this.style.Station.StationControl.selfDisciplineControl) {
if (this.style.Station.StationControl.selfDisciplineControl && this.style.Station.StationControl.selfDisciplineControl.show) {
this.selfDisciplineControl = new ESingleControl({
_subType: 'self_discipline_control',
style: this.style,
@ -486,7 +480,7 @@ export default class Station extends Group {
createVeryControl() {
// const model = this.model;
const computedControlModePoint = this.computedControlModePoint;
if (this.style.Station.StationControl.veryControl) {
if (this.style.Station.StationControl.veryControl && this.style.Station.StationControl.veryControl.show) {
this.veryControl = new ESingleControl({
_subType: 'very',
style: this.style,
@ -502,23 +496,132 @@ export default class Station extends Group {
this.add(this.veryControl);
}
if (this.style.Station.StationControl.veryControlButton) {
this.veryControlButton = new Rect({
zlevel: this.zlevel,
z: this.z,
_subType: 'veryControlButton',
shape: {
x: computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.x - this.style.Station.StationControl.lamp.radiusR,
y: computedControlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y - this.style.Station.StationControl.lamp.radiusR,
width: this.style.Station.StationControl.lamp.radiusR * 2,
height: this.style.Station.StationControl.lamp.radiusR * 2
},
style: {
lineWidth: 1,
stroke: '#fff',
fill: this.style.Station.StationControl.veryControlButton.defaultColor
}
});
if (this.style.Station.StationControl.veryControlButton.shape === 'arc') {
this.veryControlButton = new Circle({
zlevel: this.zlevel,
z: this.z + 2,
_subType: 'veryControlButton',
shape: {
cx: computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.x - this.style.Station.StationControl.lamp.radiusR,
cy: computedControlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y - this.style.Station.StationControl.lamp.radiusR,
r: this.style.Station.StationControl.lamp.radiusR
},
style: {
lineWidth: 1,
stroke: '#69666E',
fill: this.style.Station.StationControl.veryControlButton.defaultColor
}
});
this.veryControlButtonDock1 = new Circle({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
cx: computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.x - this.style.Station.StationControl.lamp.radiusR,
cy: computedControlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y - this.style.Station.StationControl.lamp.radiusR + 2,
r: this.style.Station.StationControl.lamp.radiusR + 1
},
style: {
fill: '#000'
}
});
this.veryControlButtonDock2 = new Circle({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.x - this.style.Station.StationControl.lamp.radiusR,
cy: computedControlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y - this.style.Station.StationControl.lamp.radiusR + 2,
r: this.style.Station.StationControl.lamp.radiusR + 2
},
style: {
fill: '#eee'
}
});
this.add(this.veryControlButtonDock1).add(this.veryControlButtonDock2);
} else {
this.veryControlButton = new Rect({
zlevel: this.zlevel,
z: this.z,
_subType: 'veryControlButton',
shape: {
x: computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.x - this.style.Station.StationControl.lamp.radiusR,
y: computedControlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y - this.style.Station.StationControl.lamp.radiusR,
width: this.style.Station.StationControl.lamp.radiusR * 2,
height: this.style.Station.StationControl.lamp.radiusR * 2
},
style: {
lineWidth: 1,
stroke: '#fff',
fill: this.style.Station.StationControl.veryControlButton.defaultColor
}
});
}
this.add(this.veryControlButton);
if (this.style.Station.StationControl.veryControlButton && this.style.Station.StationControl.veryControlButton.border) {
const borderLine = this.style.Station.StationControl.veryControlButton.borderLine || 1;
const width = this.style.Station.StationControl.lamp.radiusR * 2;
const leftUpX = computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.x - this.style.Station.StationControl.lamp.radiusR;
const leftUpY = computedControlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y - this.style.Station.StationControl.lamp.radiusR;
this.leftBoard = new Line({
zlevel: this.zlevel,
z: this.z + 2,
shape: {
x1: leftUpX - (borderLine - 1),
y1: leftUpY - (borderLine - 1),
x2: leftUpX - (borderLine - 1),
y2: leftUpY + width + (borderLine - 1)
},
style: {
lineWidth: borderLine,
stroke: '#FFFFFF'
}
});
this.add(this.leftBoard);
this.rightBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: leftUpX + width + (borderLine - 1),
y1: leftUpY - (borderLine - 1),
x2: leftUpX + width + (borderLine - 1),
y2: leftUpY + width + (borderLine - 1)
},
style: {
lineWidth: borderLine,
stroke: '#A0A0A0'
}
});
this.add(this.rightBoard);
this.bottomBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: leftUpX + (borderLine - 1),
y1: leftUpY + width - (borderLine - 1),
x2: leftUpX + width + (borderLine - 1),
y2: leftUpY + width + (borderLine - 1)
},
style: {
lineWidth: borderLine,
stroke: '#A0A0A0'
}
});
this.add(this.bottomBoard);
this.topBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: leftUpX - (borderLine - 1),
y1: leftUpY - (borderLine - 1),
x2: leftUpX + width + (borderLine - 1),
y2: leftUpY - (borderLine - 1)
},
style: {
lineWidth: borderLine,
stroke: '#FFFFFF'
}
});
this.add(this.topBoard);
}
this.veryControlButtonText = new Text({
zlevel: this.zlevel,
z: this.z,
@ -794,6 +897,12 @@ export default class Station extends Group {
this.interconnectedControl && this.interconnectedControl.setTextColor(this.style.Station.StationControl.lamp.purpleColor);
this.veryControl && this.veryControl.setColor(this.style.Station.StationControl.veryControl.lightColor);
this.veryControlButton && this.veryControlButton.setStyle({ fill: this.style.Station.StationControl.veryControlButton.lightColor });
if (this.style.Station.StationControl.veryControlButton && this.style.Station.StationControl.veryControlButton.border) {
this.leftBoard && this.leftBoard.setStyle('stroke', '#A0A0A0');
this.topBoard && this.topBoard.setStyle('stroke', '#A0A0A0');
this.rightBoard && this.rightBoard.setStyle('stroke', '#FFFFFF');
this.bottomBoard && this.bottomBoard.setStyle('stroke', '#FFFFFF');
}
}
handleNone() { // 空
@ -834,6 +943,16 @@ export default class Station extends Group {
} else {
this.stationText && this.stationText.stopAnimate();
}
if (this.style.Station.StationControl.veryControlButton && this.style.Station.StationControl.veryControlButton.border) {
this.leftBoard && this.leftBoard.setStyle('stroke', '#FFFFFF');
this.topBoard && this.topBoard.setStyle('stroke', '#FFFFFF');
this.rightBoard && this.rightBoard.setStyle('stroke', '#A0A0A0');
this.bottomBoard && this.bottomBoard.setStyle('stroke', '#A0A0A0');
this.leftBoard && this.leftBoard.show();
this.rightBoard && this.rightBoard.show();
this.topBoard && this.topBoard.show();
this.bottomBoard && this.bottomBoard.show();
}
}
// 设置状态
@ -881,6 +1000,19 @@ export default class Station extends Group {
}
});
}
if (model.counter) {
for (const deviceCode in model.counter) {
const device = store.getters['map/getDeviceByCode'](deviceCode);
let countNum = model.counter[deviceCode] + '';
if (countNum.length === 1) {
countNum = '00' + countNum;
} else if (countNum.length === 2) {
countNum = '0' + countNum;
}
device && device.instance && device.instance.setCount(countNum);
}
}
}
}
handlePreResetLamp() {
@ -915,9 +1047,7 @@ export default class Station extends Group {
}
handleComplexControl(controller) {
// const controller = model.controller;
const memberData = store.state.training.memberData;
// console.log(controller, memberData[controller], memberData[controller].userId, store.state.user.id, '88888888');
if (memberData[controller].userId && memberData[controller].userId == store.state.user.id) {
this.stationText.setColor(this.style.Station.stationText.currentModeColor);
} else {
@ -925,7 +1055,6 @@ export default class Station extends Group {
this.stationText.setColor(this.style.Station.stationText.dispatherColor);
} else if (memberData[controller].type == 'STATION_SUPERVISOR') {
const deviceCode = memberData[controller].deviceCode;
// console.log(deviceCode, '999999999');
if (deviceCode) {
const device = store.getters['map/getDeviceByCode'](deviceCode);
if (device.centralized) {

View File

@ -479,24 +479,31 @@ export default class Switch extends Group {
.when(500, { stroke: '#F00' })
.when(1000, { stroke: this.style.backgroundColor })
.start();
if (this.style.Switch.jointImg.loseNameFlash) {
this.name.getNameText().animateStyle(true)
.when(0, { textFill: this.style.backgroundColor })
.when(1000, { textFill: this.style.Switch.text.lossColor })
.when(2000, { textFill: this.style.backgroundColor })
.start();
}
}
// N-定位 R-反位 NO-无(失表) EX-挤叉
setSwitchFault(model) {
const { pos, fault, /* 单锁 */singleLock, /* 封锁 */blockade } = model
const { pos, fault, /* 单锁 */singleLock, /* 封锁 */blockade } = model;
const faultList = ['SPLIT', 'SQUEEZE', 'NORMAL_SPLIT', 'REVERSE_SPLIT', 'SPLIT_1'];
if (this.model.switchFaultCode) {
const switchFault = this.mapDevice[this.model.switchFaultCode];
if (this.style.SwitchFault.lamp.switchState) {
if (pos === 'N') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.controlColor)
else if (pos === 'R') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.reverseColor)
else if (pos === 'NO') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.switchingColor)
else if (pos === 'EX') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.faultColor)
if (singleLock) switchFault.instance.setControlColor(this.style.SwitchFault.lamp.lockColor)
if (blockade === 'EX') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.blockColor)
if (pos === 'N') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.controlColor);
else if (pos === 'R') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.reverseColor);
else if (pos === 'NO') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.switchingColor);
else if (pos === 'EX') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.faultColor);
if (singleLock) switchFault.instance.setControlColor(this.style.SwitchFault.lamp.lockColor);
if (blockade === 'EX') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.blockColor);
} else {
if ( fault && faultList.includes(fault) ) {
switchFault.instance.setControlColor('#F00', true);
} else {
} else {
switchFault.instance.setControlColor(this.style.backgroundColor, false);
}
}
@ -545,6 +552,13 @@ export default class Switch extends Group {
} else {
this.setLossAction(fault); // 若不是具有特殊的挤岔,则显示状态和失表一样
}
if (this.style.Switch.jointImg.loseNameFlash) {
this.name.getNameText().animateStyle(true)
.when(0, { textFill: this.style.backgroundColor })
.when(1000, { textFill: this.style.Switch.text.lossColor })
.when(2000, { textFill: this.style.backgroundColor })
.start();
}
}
/** 单锁*/

View File

@ -13,12 +13,12 @@ export default class EControl extends Group {
this.z = model.z;
this.style = model.style;
this.textStyle = model.text;
this.controlStyle = model.control;
this.controlStyle = model.control || model.arc;
this.create();
}
create() {
this.control = this.controlStyle.isSquare ? new Rect({
this.control = this.controlStyle && this.controlStyle.isSquare ? new Rect({
_subType: this.controlStyle.subType,
zlevel: this.zlevel,
z: this.z,
@ -26,7 +26,7 @@ export default class EControl extends Group {
width: this.controlStyle.shape.r,
height: this.controlStyle.shape.r,
x: this.controlStyle.shape.cx - this.controlStyle.shape.r / 2,
y: this.controlStyle.shape.cy - this.controlStyle.shape.r / 2,
y: this.controlStyle.shape.cy - this.controlStyle.shape.r / 2
},
style: {
lineWidth: this.controlStyle.lineWidth,

View File

@ -87,6 +87,9 @@ mapShape[deviceType.DepartAssist] = SaidLamp;
mapShape[deviceType.TotalAssist] = SaidLamp;
mapShape[deviceType.AssistStatus] = SaidLamp;
mapShape[deviceType.SectionOccupied] = SaidLamp;
mapShape[deviceType.ThroatRoute] = SaidLamp;
mapShape[deviceType.NoStatusLamp] = SaidLamp;
mapShape[deviceType.Counter] = SaidLamp;
mapShape[deviceType.SplitStation] = SplitStation;
mapShape[deviceType.Arrow] = Arrow;
mapShape[deviceType.Power] = Power;

View File

@ -13,7 +13,6 @@ export default class Arrow extends Group {
this.isShowShape = true;
this.create();
this.setState(model);
this.setShowMode();
}
create() {
@ -44,16 +43,7 @@ export default class Arrow extends Group {
setState(model) {
if (!this.isShowShape) return;
}
// 设置显示模式
setShowMode() {
const showMode = this.model.showMode;
const showConditions = this.model.showConditions;
if (!showConditions || showConditions === '01' || showMode === showConditions) {
this.arrow.show();
} else {
this.arrow.hide();
}
}
setShowStation(stationCode) {
if (!stationCode || this.model.stationCode === stationCode) {
this.show();

View File

@ -14,7 +14,6 @@ export default class Line2 extends Group {
this.isShowShape = true;
this.create();
this.setState(model);
this.setShowMode();
}
create() {
@ -115,18 +114,6 @@ export default class Line2 extends Group {
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.segment && this.segment.show();
this.viceSegment && this.viceSegment.show();
} else {
this.segment && this.segment.hide();
this.viceSegment && this.viceSegment.hide();
}
}
setShowStation(stationCode) {
if (!stationCode || this.model.stationCode === stationCode) {
this.segment && this.segment.show();

View File

@ -16,7 +16,6 @@ export default class Rect2 extends Group {
this.isShowShape = true;
this.create();
this.setState(model);
this.setShowMode();
}
create() {
@ -50,10 +49,7 @@ export default class Rect2 extends Group {
return new BoundingRect(this.model.position.x, this.model.position.y, 0, 0);
}
}
// 设置显示模式
setShowMode() {
}
setShowStation(stationCode) {
}

View File

@ -16,7 +16,6 @@ export default class Text2 extends Group {
this.isBigScreen = false;
this.create();
this.setState(model);
this.setShowMode();
}
create() {
@ -54,20 +53,7 @@ export default class Text2 extends Group {
return new BoundingRect(this.model.position.x, this.model.position.y, 0, 0);
}
}
// 设置显示模式
setShowMode() {
const showMode = this.model.showMode;
if (showMode == '04') {
this.text && this.text.hide();
return;
}
const showConditions = this.model.showConditions;
if (!showConditions || showConditions === '01' || showMode === showConditions) {
this.text && this.text.show();
} else {
this.text && this.text.hide();
}
}
setShowStation(stationCode) {
if (!stationCode || this.model.stationCode === stationCode) {
this.eachChild(item => {

View File

@ -38,7 +38,7 @@ import TrainFlag from './dialog/trainFlag';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
@ -230,18 +230,18 @@ export default {
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
{
label: '越红灯行驶',
handler: this.handleOverEedLight
},
// {
// label: '',
// handler: this.nextStation
// },
// {
// label: '',
// handler: this.handleOverFuideSignal
// },
// {
// label: '',
// handler: this.handleOverEedLight
// },
{
label: '开关门',
handler: this.handleOpenOrCloseDoor
@ -381,39 +381,21 @@ export default {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleOverFuideSignal() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Guide_Signal',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleOverEedLight() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Red_Light',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
@ -421,13 +403,7 @@ export default {
},
//
handleOpenOrCloseDoor() {
const group = this.$route.query.group;
const param = {
commandType: 'Open_Or_Close_Door',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
commitOperate(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
@ -438,13 +414,7 @@ export default {
},
//
setInbound() {
const group = this.$route.query.group;
const param = {
commandType: 'Inbound',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
@ -460,78 +430,42 @@ export default {
},
//
handleTurnDirection() {
const group = this.$route.query.group;
const param = {
commandType: 'Turn_Direction',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyAmcMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'AM_C' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplySmcMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'SM_C' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyAmiMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'AM_I' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplySmiMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'SM_I' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyRmMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'RM' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();

View File

@ -143,18 +143,18 @@ export default {
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
{
label: '越红灯行驶',
handler: this.handleOverEedLight
},
// {
// label: '',
// handler: this.nextStation
// },
// {
// label: '',
// handler: this.handleOverFuideSignal
// },
// {
// label: '',
// handler: this.handleOverEedLight
// },
{
label: '开关门',
handler: this.handleOpenOrCloseDoor
@ -291,39 +291,21 @@ export default {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleOverFuideSignal() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Guide_Signal',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleOverEedLight() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Red_Light',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
@ -331,13 +313,7 @@ export default {
},
//
handleOpenOrCloseDoor() {
const group = this.$route.query.group;
const param = {
commandType: 'Open_Or_Close_Door',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
commitOperate(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
@ -356,13 +332,7 @@ export default {
},
//
setInbound() {
const group = this.$route.query.group;
const param = {
commandType: 'Inbound',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
@ -370,78 +340,42 @@ export default {
},
//
handleTurnDirection() {
const group = this.$route.query.group;
const param = {
commandType: 'Turn_Direction',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyAmcMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'AM_C' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplySmcMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'SM_C' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyAmiMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'AM_I' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplySmiMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'SM_I' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyRmMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'RM' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitTrainSend(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();

View File

@ -29,7 +29,7 @@ import CancelMouseState from '@/mixin/CancelMouseState';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
export default {
@ -126,18 +126,18 @@ export default {
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
{
label: '越红灯行驶',
handler: this.handleOverEedLight
},
// {
// label: '',
// handler: this.nextStation
// },
// {
// label: '',
// handler: this.handleOverFuideSignal
// },
// {
// label: '',
// handler: this.handleOverEedLight
// },
{
label: '开关门',
handler: this.handleOpenOrCloseDoor
@ -262,39 +262,21 @@ export default {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleOverFuideSignal() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Guide_Signal',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleOverEedLight() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Red_Light',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
@ -302,13 +284,7 @@ export default {
},
//
handleOpenOrCloseDoor() {
const group = this.$route.query.group;
const param = {
commandType: 'Open_Or_Close_Door',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
commitOperate(menuOperate.Driver.openOrCloseDoor, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
@ -327,13 +303,7 @@ export default {
},
//
setInbound() {
const group = this.$route.query.group;
const param = {
commandType: 'Inbound',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
@ -341,78 +311,42 @@ export default {
},
//
handleTurnDirection() {
const group = this.$route.query.group;
const param = {
commandType: 'Turn_Direction',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyAmcMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'AM_C' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplySmcMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'SM_C' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyAmiMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'AM_I' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplySmiMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'SM_I' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyRmMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'RM' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();

View File

@ -23,11 +23,13 @@
<i class="el-icon-warning" />
</el-tooltip>
</el-form-item>
<el-form-item prop="through" label="">
<el-form-item prop="through" label="方式:">
<el-radio-group v-model="formModel.through">
<el-radio :label="1">越红灯行驶</el-radio>
<el-radio :label="2">越引导行驶</el-radio>
<el-radio :label="0"></el-radio>
<el-radio :label="1">越红灯行驶</el-radio><br>
<el-radio style="margin-top: 10px" :label="2">越引导行驶</el-radio><br>
<el-radio style="margin-top: 10px" :label="3">运行至前方车站</el-radio><br>
<el-radio style="margin-top: 10px" :label="4">进路闭塞法行车</el-radio><br>
<el-radio style="margin-top: 10px" :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="targetDeviceCode" label="目的地:">

View File

@ -537,6 +537,73 @@ export const menuOperate = {
cmdType: CMD.Driver.CMD_DRIVER_CHANGE_HEAD
}
},
Driver: {
// 驾驶至
driveAhead: {
operation: OperationEvent.Driver.driveAhead.menu.operation,
cmdType: CMD.Driver.CMD_DRIVE_AHEAD
},
// 进路闭塞法行车
routeBlockDrive: {
operation: OperationEvent.Driver.routeBlockDrive.menu.operation,
cmdType: CMD.Driver.CMD_ROUTE_BLOCK_DRIVE
},
// 越红灯行驶
driveThroughTheRedLight: {
operation: OperationEvent.Driver.driveThroughTheRedLight.menu.operation,
cmdType: CMD.Driver.CMD_DRIVE_THROUGH_THE_RED_LIGHT
},
// 越引导信号行驶
driveThroughTheGuideSignal: {
operation: OperationEvent.Driver.driveThroughTheGuideSignal.menu.operation,
cmdType: CMD.Driver.CMD_DRIVE_THROUGH_THE_GUIDE_SIGNAL
},
// 开关门
openOrCloseDoor: {
operation: OperationEvent.Driver.openOrCloseDoor.menu.operation,
cmdType: CMD.Driver.CMD_OPEN_OR_CLOSE_DOOR
},
// 设置限速
setSpeedLimit: {
operation: OperationEvent.Driver.setSpeedLimit.menu.operation,
cmdType: CMD.Driver.CMD_SET_SPEED_LIMIT
},
// 换端
// turnDirection: {
// operation: OperationEvent.Driver.turnDirection.menu.operation,
// cmdType: CMD.Driver.CMD_TURN_DIRECTION
// },
// 驾驶至
driveTo: {
operation: OperationEvent.Driver.driveTo.menu.operation,
cmdType: CMD.Driver.CMD_DRIVE_TO
},
// 回库
inbound: {
operation: OperationEvent.Driver.inbound.menu.operation,
cmdType: CMD.Driver.CMD_INBOUND
},
// 修改预选模式
changePreselectionMode: {
operation: OperationEvent.Driver.changePreselectionMode.menu.operation,
cmdType: CMD.Driver.CMD_CHANGE_PRESELECTION_MODE
},
// 转NRM模式
applyNrm: {
operation: OperationEvent.Driver.applyNrm.menu.operation,
cmdType: CMD.Driver.CMD_APPLY_NRM
},
// 发车
departTrain: {
operation: OperationEvent.Driver.departTrain.menu.operation,
cmdType: CMD.Driver.CMD_DEPART_TRAIN
},
// 停车
parkingTrain: {
operation: OperationEvent.Driver.parkingTrain.menu.operation,
cmdType: CMD.Driver.CMD_PARKING_TRAIN
}
},
CTC: {
// 完成接预
receivingNotice: {
@ -687,8 +754,14 @@ export const menuOperate = {
// 增加列车固定径路
addTrainFixedPath:{
operation: OperationEvent.CTCCommand.addTrainFixedPath.menu.operation,
cmdType: CMD.CTC.CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA
cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_EDIT
},
// 批量增加列车固定径路
batchTrainFixedPath:{
operation: OperationEvent.CTCCommand.batchTrainFixedPath.menu.operation,
cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_BATCH
},
// 导入列车固定径路
importTrainFixedPath:{
operation: OperationEvent.CTCCommand.importTrainFixedPath.menu.operation,
@ -697,12 +770,52 @@ export const menuOperate = {
// 删除列车固定径路
deleteTrainFixedPath:{
operation: OperationEvent.CTCCommand.deleteTrainFixedPath.menu.operation,
cmdType: CMD.CTC.CTC_REMOVE_RUN_PLAN_FROM_EDIT_AREA
cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_DELETE
},
// 运行计划发布至CTC
// 清空列车固定径路
clearTrainFixedPath:{
operation: OperationEvent.CTCCommand.clearTrainFixedPath.menu.operation,
cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_CLEAR
},
// 列车固定径路发布生效区
releaseTrainFixedPath:{
operation: OperationEvent.CTCCommand.releaseTrainFixedPath.menu.operation,
cmdType: CMD.CTC.CTC_RELEASE_RUN_PLAN_TO_SIMULATION
cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_PUBLISH
},
// 获取股道列表
getStationTrack:{
operation: OperationEvent.CTCCommand.getStationTrack.menu.operation,
cmdType: CMD.CTC.CTC_STATION_DETAIL_LIST
},
// 修改股道信息
modifyStationTrack:{
operation: OperationEvent.CTCCommand.modifyStationTrack.menu.operation,
cmdType: CMD.CTC.CTC_STATION_DETAIL_EDIT
},
// 股道发布生效区
releaseStationTrack:{
operation: OperationEvent.CTCCommand.releaseStationTrack.menu.operation,
cmdType: CMD.CTC.CTC_STATION_DETAIL_PUBLISH
},
// 获取固定列车径路列表
getTrainFixedPath:{
operation: OperationEvent.CTCCommand.getTrainFixedPath.menu.operation,
cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_LIST
},
// 获取出入口列表
getStationDirection:{
operation: OperationEvent.CTCCommand.getStationDirection.menu.operation,
cmdType: CMD.CTC.CTC_STATION_IO_GATE_LIST
},
// 修改出入口
modifyStationDirection:{
operation: OperationEvent.CTCCommand.modifyStationDirection.menu.operation,
cmdType: CMD.CTC.CTC_STATION_IO_GATE_EDIT
},
// 出入口发布生效区
releaseStationDirection:{
operation: OperationEvent.CTCCommand.releaseStationDirection.menu.operation,
cmdType: CMD.CTC.CTC_STATION_IO_GATE_PUBLISH
},
setRoute: {
operation: OperationEvent.CTCCommand.setRoute.menu.operation,

View File

@ -28,7 +28,7 @@ import CancelMouseState from '@/mixin/CancelMouseState';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'MenuTrain',
@ -123,22 +123,22 @@ export default {
}
],
menuDirective: [
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
},
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
{
label: '越红灯行驶',
handler: this.handleOverEedLight
}
// {
// label: '',
// handler: this.nextStation
// },
// {
// label: '',
// handler: this.routeBlockRun
// }
// {
// label: '',
// handler: this.handleOverFuideSignal
// },
// {
// label: '',
// handler: this.handleOverEedLight
// }
],
menuSpeed: [
{
@ -218,52 +218,28 @@ export default {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Ahead',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
commitOperate(menuOperate.Driver.driveAhead, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
routeBlockRun() {
const group = this.$route.query.group;
const param = {
commandType: 'Route_Block_Drive',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
commitOperate(menuOperate.Driver.routeBlockDrive, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleOverFuideSignal() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Guide_Signal',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
commitOperate(menuOperate.Driver.driveThroughTheGuideSignal, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleOverEedLight() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Red_Light',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
commitOperate(menuOperate.Driver.driveThroughTheRedLight, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();

View File

@ -0,0 +1,77 @@
<template>
<ul class="settings-menu" :class="{ 'pos-bottom': position === 'bottom', 'pos-right': position === 'right' }">
<li
class="settings-menu-item"
v-for="(item, i) in items"
:key="`li-${i}`"
@mouseenter="currMenuIndex = i"
@mouseleave="currMenuIndex = -1"
@click.stop="handleMenuItemClick(item.id)"
>
<span>{{ item.label }}</span>
<span :style="{ float: 'right' }" v-if="item.children">></span>
<settings-menu
@select="handleMenuItemClick(`${item.id}-${$event}`)"
v-if="item.children && currMenuIndex === i"
:items="item.children"
position="right"
/>
</li>
</ul>
</template>
<script>
export default {
name: 'SettingsMenu',
props: {
items: Array,
position: {
validator: val => ['right', 'bottom'].includes(val),
},
},
emits: ['select'],
computed: {
currentSubMenu() {},
},
data() {
return {
currMenuIndex: -1,
}
},
methods: {
handleMenuItemClick(id) {
if (!id) return
this.$emit('select', id)
},
},
}
</script>
<style lang="scss" scoped>
.settings-menu {
background-color: #add8e6;
line-height: 2rem;
min-width: 160px;
margin: 0;
padding: 0;
border: 1px solid #666;
border-top: 0;
}
.settings-menu-item {
list-style: none;
padding: 0 0 0 1rem;
border-top: 1px solid #666;
position: relative;
}
.settings-menu-item:hover {
background-color: #88d8ee;
}
.settings-menu-item:active {
background-color: #97e3f8;
}
.pos-right {
position: absolute;
top: 0;
left: 100%;
}
</style>

View File

@ -0,0 +1,339 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
title="占线板显示配置"
:visible.sync="show"
width="800px"
:before-close="doClose"
:z-index="3000"
:append-to-body="true"
:modal="true"
>
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="股道视图" name="railView"></el-tab-pane>
<el-tab-pane label="进路序列" name="routeSequence"></el-tab-pane>
<el-tab-pane label="股道视图显示参数" name="railViewParam"></el-tab-pane>
<el-tab-pane label="预览界面" name="preview"></el-tab-pane>
</el-tabs>
<div class="railView" v-if="activeName === 'railView'">
<div class="left">
<div class="list">
<div class="item">沈阳&amp;沈阳北</div>
<div class="item">沈阳</div>
</div>
<div class="btn-area">
<div class="row">
<div>显示名</div>
<el-input style="width:40%;" v-model="form.railView.displayName"></el-input>
<el-select style="width:30%;" v-model="form.railView.view.value">
<el-option
v-for="option in form.railView.view.options"
:key="option.value"
:label="option.label"
:value="option.value"
></el-option>
</el-select>
</div>
<div class="row">
<el-button>增加页面</el-button>
<el-button>修改名称</el-button>
<el-button>删除页面</el-button>
</div>
</div>
</div>
<div class="right">
<div class="list">
<div class="item">沈阳</div>
<div class="item">沈阳北</div>
</div>
<div class="btn-area">
<div class="row">
<el-select style="width:100%;" v-model="form.railView.station.value">
<el-option
v-for="option in form.railView.station.options"
:key="option.value"
:label="option.label"
:value="option.value"
></el-option>
</el-select>
</div>
<div class="row">
<el-button>增加视图</el-button>
<el-button>删除视图</el-button>
</div>
</div>
</div>
</div>
<div class="routeSequence" v-if="activeName === 'routeSequence'">
<div class="left">
<div class="list">
<div class="item">沈阳&amp;沈阳北</div>
<div class="item">沈阳</div>
</div>
<div class="btn-area">
<div class="row">
<div>类型</div>
<el-select style="width:70%;">
<el-option>列车进路序列</el-option>
</el-select>
</div>
<div class="row">
<el-button>增加显示格</el-button>
<el-button>删除显示格</el-button>
</div>
</div>
</div>
<div class="right">
<div class="list">
<div class="item">沈阳</div>
<div class="item">沈阳北</div>
</div>
<div class="btn-area">
<div class="row">
<el-select style="width:100%;">
<el-option
v-for="option in form.railView.station.options"
:key="option.value"
:label="option.label"
:value="option.value"
></el-option>
</el-select>
</div>
<div class="row">
<el-button>增加序列</el-button>
<el-button>删除序列</el-button>
</div>
</div>
</div>
</div>
<div class="railViewParam" v-if="activeName === 'railViewParam'">
<div class="content">
<div class="col">
<div class="item">
占线板操作按钮宽度
<el-input-number class="input" :controls="false" />
像素
</div>
<div class="item">
占线板流程按钮宽度
<el-input-number class="input" :controls="false" />
像素
</div>
<div class="item">
占线板进路按钮宽度
<el-input-number class="input" :controls="false" />
像素
</div>
<div class="item">
占线板控制按钮宽度
<el-input-number class="input" :controls="false" />
像素
</div>
<div class="item">
占线板车次号宽度
<el-input-number class="input" :controls="false" />
像素
</div>
<div class="item">
占线板车站名显示
<el-input-number class="input" :controls="false" />
字符
</div>
</div>
<div class="col">
<div class="item">
占线板列车状态显示
<el-input-number class="input" :controls="false" />
字符
</div>
<div class="item">
占线板时间显示
<el-input-number class="input" :controls="false" />
字符
</div>
<div class="item">
占线板线路显示
<el-input-number class="input" :controls="false" />
字符
</div>
<div class="item">
占线板工作信息显示
<el-input-number class="input" :controls="false" />
字符
</div>
<div class="item">
占线板流程按钮字体
<el-input-number class="input" :controls="false" />
像素
</div>
</div>
<div class="col">
<div class="item">
占线板文字信息字体
<el-input-number class="input" :controls="false" />
像素
</div>
<div class="item">
占线板进路操作框高
<el-input-number class="input" :controls="false" />
像素
</div>
<div class="item">
占线板进路操作框宽
<el-input-number class="input" :controls="false" />
像素
</div>
<div class="item">
机车换挂按钮个数
<el-input-number class="input" :controls="false" />
</div>
<div class="item">
<el-checkbox>显示图定时刻</el-checkbox>
</div>
</div>
</div>
</div>
<div class="preview" v-if="activeName === 'preview'">
<div class="left">
<div class="list">
<div class="item">沈阳&amp;沈阳北</div>
<div class="item">沈阳</div>
</div>
</div>
<div class="right">
<div class="row">
<el-radio label="1">列车进路预览</el-radio>
<el-radio label="2">调车进路预览</el-radio>
</div>
<div class="row">
车站
<el-select>
<el-optopn>沈阳</el-optopn>
</el-select>
</div>
<div class="row">
预览
<el-select>
<el-optopn>沈阳</el-optopn>
</el-select>
</div>
<div class="row">
<el-button>增加</el-button>
<el-button>删除</el-button>
</div>
</div>
</div>
<div class="optBar">
<el-button-group>
<el-button width="100px">生成默认股道视图设置</el-button>
<el-button>生成默认序列视图设置</el-button>
</el-button-group>
<el-button-group>
<el-button>保存</el-button>
<el-button @click="doClose">关闭</el-button>
</el-button-group>
</div>
</el-dialog>
</template>
<script>
export default {
name: 'BoardViewSetting',
data() {
return {
show: false,
activeName: 'railView',
form: {
railView: {
diaplayName: '',
view: {
value: 'rail',
options: [
{
label: '股道视图',
value: 'rail',
},
],
},
station: {
value: 'shenyang',
options: [{ label: '沈阳', value: 'shenyang' }],
},
},
},
}
},
methods: {
doShow() {
this.show = true
},
doClose() {
this.show = false
},
},
}
</script>
<style lang="scss" scoped>
.railView,
.preview,
.routeSequence {
display: flex;
margin-bottom: 10px;
.left,
.right {
width: 50%;
}
.list {
margin: 10px;
background-color: #fff;
height: 10rem;
padding: 0 5px;
.item {
line-height: 1.2rem;
}
}
.row {
margin: 8px;
display: flex;
justify-content: space-around;
}
}
.preview {
.right {
display: flex;
flex-direction: column;
justify-content: space-between;
}
}
.railViewParam {
.content {
display: flex;
align-items: flex-start;
height: 300px;
margin-bottom: 20px;
.col {
width: 33%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
.item {
line-height: 1.5rem;
.input {
width: 40px;
}
}
}
}
}
.optBar {
display: flex;
justify-content: space-between;
.el-button {
width: auto !important;
margin: 0 5px;
}
}
</style>

View File

@ -1,20 +1,20 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm"
class="datie-02__systerm"
:visible.sync="show"
width="360px"
width="250px"
:before-close="doClose"
:z-index="2000"
:modal="false"
title="密码校验"
:title="title"
:close-on-click-modal="false"
append-to-body
>
<!-- 密码校验 -->
<el-row>
<el-col :span="22" :offset="1">
<el-input v-model="encryptionPassword" placeholder="请使用软键盘输入" size="medium" :disabled="true" />
</el-col>
<el-input v-model="encryptionPassword" placeholder="" size="medium" :disabled="true" style="width: 180px;display: inline-block;float: left;" />
<el-button @click="backSpace">退格</el-button>
</el-row>
<el-row v-if="showMistake">
<el-col :span="22" :offset="1">
@ -22,6 +22,22 @@
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-button @click="inputNum">0</el-button>
<el-button @click="inputNum">1</el-button>
<el-button @click="inputNum">2</el-button>
<el-button @click="inputNum">3</el-button>
<el-button @click="inputNum">4</el-button>
<el-button :id="domIdConfirm" :loading="loading" @click="commit">确认</el-button>
</el-row>
<el-row justify="center" class="button-group">
<el-button @click="inputNum">5</el-button>
<el-button @click="inputNum">6</el-button>
<el-button @click="inputNum">7</el-button>
<el-button @click="inputNum">8</el-button>
<el-button @click="inputNum">9</el-button>
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
</el-row>
<!--
<el-col :span="4" :offset="1">
<el-button @click="inputNum">7</el-button>
</el-col>
@ -31,7 +47,7 @@
<el-col :span="4" :offset="4">
<el-button @click="inputNum">9</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">4</el-button>
@ -72,11 +88,12 @@
<el-col :span="4" :offset="12">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-row> -->
</el-dialog>
</template>
<script>
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
@ -94,7 +111,8 @@ export default {
/* 输入值替换为对应长度的星号*/
encryptionPassword: '',
loading: false,
showMistake: false
showMistake: false,
title:''
};
},
computed: {
@ -109,7 +127,8 @@ export default {
}
},
methods: {
doShow(operate) {
doShow(operate, title) {
this.title = title;
this.operate = operate || {};
this.operation = operate.operation;
if (operate.operateNext) {
@ -125,6 +144,7 @@ export default {
this.loading = false;
this.dialogShow = false;
this.showMistake = false;
this.title = '';
this.$store.dispatch('training/emitTipFresh');
},
commit() { //
@ -164,6 +184,9 @@ export default {
operation: OperationEvent.Command.cancel.password.operation
};
this.$emit('checkCancel');
if (this.operate.nextCmdType == CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE) {
this.$store.dispatch('training/updateMapState', [{code: this.operate.code, _type:'SignalButton', pressDown: 0}]);
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
@ -190,4 +213,175 @@ export default {
color: red;
}
.datie-02__systerm .el-dialog {
background: #0055E8;
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
border: 1px solid rgb(69, 134, 247);
border-radius: 6px;
font-size: 13px !important;
color: #000;
}
.datie-02__systerm .el-dialog span {
font-size: 13px !important;
line-height: 22px;
}
.datie-02__systerm .el-dialog span .el-icon-arrow-up{
line-height: 18px;
}
.datie-02__systerm .el-dialog .el-dialog__footer {
background: #ECE9D8;
opacity: 1;
}
.datie-02__systerm .el-dialog .el-dialog__body {
padding: 0px;
margin: 0px 3px 3px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #ECE9D8;
opacity: 1;
}
.datie-02__systerm .el-dialog .el-dialog__title {
font-size: 16px;
color: #fff;
position: absolute;
top: 4px;
left: 7px;
}
.datie-02__systerm .el-dialog .el-button {
height: 30px;
line-height: 22px;
padding: 0px 13px;
/* width: 80px; */
border: 1px solid #000000;
border-radius: 4px !important;
color: #000;
font-weight: bold;
background: linear-gradient(180deg, #fff, #efebf7);
margin-left: 0px
}
.datie-02__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #efebde !important;
border-top: 2px #7f796f solid;
border-left: 2px #7F796E solid;
border-radius: 0px;
height:30px;
color:#000;
}
.datie-02__systerm .el-dialog .el-dialog__headerbtn {
/* background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770); */
/* border: 1px solid #fff; */
display: none;
border-radius: 4px;
top: 6px;
right: 3px;
line-height: 16px;
}
.datie-02__systerm .el-dialog .button-group {
font-size:0;
margin-top:2px;
}
/*
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.chengdou-03__systerm .el-dialog .expand {
width: 120px;
}
.chengdou-03__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.chengdou-03__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.chengdou-03__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.chengdou-03__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.chengdou-03__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
height: 22px !important;
line-height: 22px !important;
}
.chengdou-03__systerm .el-dialog .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
height: 22px !important;
line-height: 22px !important;
}
.chengdou-03__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.chengdou-03__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.chengdou-03__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.chengdou-03__systerm .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.chengdou-03__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.chengdou-03__systerm .el-dialog .el-table .cell {
height: 22px;
line-height: 22px;
}
.chengdou-03__systerm .el-dialog .el-table th.is-leaf {
background: #F0F0F0 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.chengdou-03__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.chengdou-03__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
} */
</style>

View File

@ -0,0 +1,148 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
title="股道视图参数设置"
:visible.sync="show"
width="800px"
:before-close="doClose"
:z-index="3000"
:append-to-body="true"
:modal="true"
>
<div class="content">
<div class="block block1">
<div class="list">
<div class="item">&lt;2&gt;**站股道视图参数</div>
</div>
<div class="row">
上行铁鞋描述
<el-input style="width: 60%;"></el-input>
</div>
<div class="row">
下行铁鞋描述
<el-input style="width: 60%;"></el-input>
</div>
</div>
<div class="block block2">
<div class="row">
名称
<el-input style="width: 60%;"></el-input>
</div>
<div class="row">
车站
<el-select style="width: 60%;"></el-select>
</div>
<div class="wrapper">
<div class="list" style="width: 60%;">
<div class="item">19G --- 行数:2</div>
</div>
<div class="btngroup" style="width: 40%;">
<el-button>上移</el-button>
<el-button>下移</el-button>
<el-button>增加行数</el-button>
<el-button>减少行数</el-button>
</div>
</div>
</div>
<div class="block block3">
<div class="row">接车操作</div>
<div class="wrapper">
<div class="list" style="width: 60%;">
<div class="item">接预</div>
<div class="item">接路</div>
<div class="item">到点</div>
</div>
<div class="btngroup" style="width: 40%;">
<el-button>上移</el-button>
<el-button>下移</el-button>
</div>
</div>
</div>
<div class="block block4">
<div class="row">发车操作</div>
<div class="wrapper">
<div class="list" style="width: 60%;">
<div class="item">接预</div>
<div class="item">接路</div>
<div class="item">到点</div>
<div class="item">列检</div>
<div class="item">交票</div>
<div class="item">乘降</div>
<div class="item">交令</div>
</div>
<div class="btngroup" style="width: 40%;">
<el-button>上移</el-button>
<el-button>下移</el-button>
</div>
</div>
</div>
</div>
<div class="btn-bar">
<el-button>上传</el-button>
<el-button>保存</el-button>
<el-button @click="doClose">关闭</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
name: 'RailViewSetting',
data() {
return {
show: false,
}
},
methods: {
doShow() {
this.show = true
},
doClose() {
this.show = false
},
},
}
</script>
<style lang="scss" scoped>
.content {
height: 560px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
.block {
.wrapper {
display: flex;
justify-content: space-between;
align-items: center;
height: 70%;
.btngroup {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 70%;
}
}
.list {
background-color: #fff;
height: calc(100% - 5em);
padding: 0 5px;
overflow-y: scroll;
.item {
line-height: 1.2rem;
}
}
.row {
margin: 8px;
display: flex;
justify-content: space-around;
}
}
}
.btn-bar {
display: flex;
justify-content: space-evenly;
}
</style>

View File

@ -37,6 +37,19 @@
<div style="width: 60%;height: 30px;line-height: 30px;text-align: center;">提示信息窗</div>
<div style="width: 40%;height: 30px;line-height: 30px;text-align: center;border-left: 2px #ccc solid;">{{ '操控A:主机' + ' ' + dateString + ' ' + time }}</div>
</div>
<div v-if="$store.state.training.prdType == '01'&& !isCtc" class="simulationAlarmInfo">
<div v-for="(tipContent,index) in tipContentList" :key="index" class="eachTipContent">{{ tipContent.time+": "+tipContent.message }}</div>
</div>
<div v-if="$store.state.training.prdType == '01'&& !isCtc" class="simulationTellInfo">
<div class="simulationTellInfoTop">
<div class="simulationTellInfoTopEach backGreen">联锁I</div>
<div class="simulationTellInfoTopEach backRed">联锁II</div>
<div class="simulationTellInfoTopEach backGreen">操作A</div>
<div class="simulationTellInfoTopEach backYellow">操作B</div>
<div class="simulationTellInfoTopEach backGreen">维修机</div>
</div>
</div>
<div v-if="$store.state.training.prdType == '01'&& !isCtc" class="simulationDeviceInfo" />
<!-- <div v-if="!isCtc && isDispStation" class="goDispatcherLoger">
<el-button size="small" @click="goDispatcherLoger">行车日志</el-button>
</div> -->
@ -108,6 +121,7 @@ import CtcBarIcon18 from '@/assets/ctc_icon/pic18.png';
import cmdManage from '@/views/dispatcherStationManage/cmdManage.vue';
import signedCmd from '@/views/dispatcherStationManage/signedCmd.vue';
import {getRunplanInStation} from '@/api/runplan';
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
export default {
name: 'Menus',
@ -163,6 +177,7 @@ export default {
{ id: 6, message: '这是预警信息六' },
{ id: 7, message: '这是预警信息七' }
],
tipContentList:[],
time: '00:00:00',
dateString: '',
dateString1: '',
@ -238,6 +253,24 @@ export default {
const text = station.name + msg.arriveRunPlan.tripNumber + '次发车预告';
this.speechSynthesis(text);
});
},
'$store.state.socket.simulationAlarmInfo': function(val) {
(val || []).forEach(item => {
if (!item.confirmed) {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
let fault = '';
deviceFaultType[device._type].forEach(deviceFault=>{
if (deviceFault.value == item.description) {
fault = deviceFault.label;
}
});
if ( item.description == 'FAULT_LOCK' ) { fault = '故障锁闭'; }
this.tipContentList.push({time:item.time, message:deviceType[device._type] + (device.name || device.groupNumber) + fault});
if (this.tipContentList.length > 15) {
this.tipContentList.shift();
}
}
});
}
// //
// '$store.state.map.mapViewLoadedCount': function (val) { //
@ -272,6 +305,12 @@ export default {
this.$store.dispatch('map/setPictureDeviceMap', {});
},
methods: {
changeSignedStatus(info) {
this.$refs.cmdManage.changeSignedStatus(info);
},
signedCmdClose() {
this.$refs.cmdManage.doShow();
},
getRunplanInStationData() {
getRunplanInStation(this.group).then(response => {
// debugger;
@ -354,9 +393,23 @@ export default {
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.$jlmap.updateShowStation(list, this.$store.state.map.showCentralizedStationCode || this.showCentralizedStationCode);
this.$jlmap.setCenter(this.$store.state.map.showCentralizedStationCode || this.showCentralizedStationCode);
this.$jlmap.updateTransform(map.scaling, map.origin);
if (this.$store.state.map.map && this.$store.state.map.map.pictureList) {
const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCode === this.showCentralizedStationCode && picture.type === 'chainStation');
if (picture) {
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
const deviceList = [];
const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) {
deviceList.push(deviceCode);
}
this.$jlmap.updatePicture(deviceList);
this.$jlmap.updateTransform(picture.scaling, picture.origin);
}
} else {
this.$jlmap.updateShowStation(list, this.$store.state.map.showCentralizedStationCode || this.showCentralizedStationCode);
this.$jlmap.setCenter(this.$store.state.map.showCentralizedStationCode || this.showCentralizedStationCode);
this.$jlmap.updateTransform(map.scaling, map.origin);
}
},
getRailwaySimulationRunplanSend() {
const stationCode = this.$store.state.training.roleDeviceCode;
@ -973,4 +1026,70 @@ export default {
50% {background:#ff1900;}
100% {background:#f0f0f0;}
}
.simulationAlarmInfo{
position: absolute;
width: 320px;
background: #cb204d;
height: 100px;
z-index: 2;
top: 50px;
left: 10px;
padding: 5px;
overflow:auto;
}
.eachTipContent{margin-top:5px;font-size:14px;}
.simulationAlarmInfo::-webkit-scrollbar {
width: 5px;
}
.simulationAlarmInfo::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #c3c3c3;
}
.simulationAlarmInfo::-webkit-scrollbar-track {
border-radius: 0;
background: #cb204d;
}
.simulationTellInfo{
position: absolute;
width: 328px;
top: 50px;
right: 10px;
padding: 0px 0px 0px 0px;
overflow: auto;
background: #c3c3c3;
z-index: 2;
display: inline-block;
font-size: 0;
}
.simulationDeviceInfo{
position: absolute;
width: 328px;
height: 100px;
top: 83px;
right:10px;
padding: 5px;
overflow:auto;
background: #c3c3c3;
z-index: 2;
}
.simulationTellInfoTop{
display: inline-block;
font-size: 0;
}
.simulationTellInfoTopEach{
padding: 6px 11px;
display: inline-block;
background: #dedede;
font-size: 15px;
border-top:2px #9c868b solid;
border-left:2px #9c868b solid;
border-right:2px #ecfbe2 solid ;
border-bottom:2px #ecfbe2 solid;
}
.backRed{background: #ff0000;}
.backYellow{background: #ffff00;}
.backGreen{background: #00ff00;}
</style>

View File

@ -1,6 +1,6 @@
<template>
<div v-if="isShowBtn" id="menuButtons_box" class="menu menuButton" style="height: 35px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
<button :id="Station.stationMasterLock.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor: xGuideMasterLock? guideColorDown: guideColorUp}" @click="guideLockRightButtonDown()">
<div v-if="isShowBtn" id="menuButtons_box" class="menu menuButton" style="height:40px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
<button :id="Station.stationMasterLock.rightButton.domId" class="button_box" :style="{width: width+'px', backgroundColor: xGuideMasterLock? guideColorDown: guideColorUp}" @click="guideLockRightButtonDown()">
<span style="color: #800000">
<center><b>X引导总锁</b></center>
</span>
@ -160,7 +160,7 @@ export default {
guideColorUp: '#DCDCDC',
buttonDownColor: '#FEEE1A',
buttonUpColor: '#DCDCDC',
width: 78,
width: 75,
tempData: null,
offset: {},
commandTypeList: [],
@ -294,6 +294,9 @@ export default {
passWordCommit(data) {
let operate = {};
if (data.nextCmdType) {
if (data.nextCmdType == CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE) {
this.$store.dispatch('training/updateMapState', [{code: data.code, _type:'SignalButton', pressDown: 0}]);
}
operate = {
over: true,
operation: data.operation,
@ -318,6 +321,8 @@ export default {
} else if (operate.operationPre === this.Switch.guideLock.rightButton.operation || operate.operation === this.Switch.guideLock.rightButton.operation) {
this.guideLockRightFlag = !this.guideLockRightFlag;
}
// debugger;
// this.$store.dispatch('menuOperation/setButtonOperation', operate.operation); //
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
@ -333,6 +338,7 @@ export default {
if (dom) {
dom.disabled = false;
dom.style.backgroundColor = this.buttonUpColor;
dom.classList.remove('downActive');
this.$refs.password.doClose();
}
}
@ -343,6 +349,7 @@ export default {
if (dom) {
dom.disabled = true;
dom.style.backgroundColor = this.buttonDownColor;
dom.classList.add('downActive');
}
}
},
@ -385,7 +392,7 @@ export default {
operate.param = {throat: 'S', stationCode: this.$store.state.map.showCentralizedStationCode};
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
this.$refs.password.doShow(operate, 'S引导总锁');
}
});
},
@ -401,7 +408,7 @@ export default {
operate.param = {throat: 'X', stationCode: this.$store.state.map.showCentralizedStationCode};
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
this.$refs.password.doShow(operate, 'X引导总锁');
}
});
},
@ -414,6 +421,12 @@ export default {
//
const operationList = [this.Signal.humanTrainRoute.button.operation, this.Section.fault.button.operation, this.Section.defectiveShunting.button.operation,
this.Signal.signalTurnOff.menuButton.operation];
const operationMap = {
[this.Signal.humanTrainRoute.button.operation]:'总人解',
[this.Section.fault.button.operation]:'区故解',
[this.Section.defectiveShunting.button.operation]:'分路不良',
[this.Signal.signalTurnOff.menuButton.operation]:'灭灯'
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.operation = operation;
@ -423,7 +436,7 @@ export default {
//
if (operationList.includes(operation)) {
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
this.$refs.password.doShow(operate, operationMap[operation]);
}
this.timeNode = this.$store.state.socket.simulationTimeSync;
this.$store.dispatch('training/emitTipFresh');
@ -551,7 +564,8 @@ export default {
this.sendCommand(operate);
} else {
operate.nextCmdType = CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
this.$refs.password.doShow(operate);
this.$refs.password.doShow(operate, '引导信号');
this.$store.dispatch('training/updateMapState', [{code: model.code, _type: model._type, pressDown: 1}]);
}
},
//
@ -645,7 +659,7 @@ export default {
operate.cmdType = CMD.Switch.CMD_SWITCH_MASTER_LOCK;
this.sendCommand(operate);
} else {
this.$refs.password.doShow(operate);
this.$refs.password.doShow(operate, '引导信号');
}
}
},
@ -754,6 +768,7 @@ export default {
const modelTypeMap = {
//
'ASSIST':{
name:'总辅助',
operation:this.CTCCommand.assistPressMainAssist.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_MAIN_ASSIST,
param:{
@ -764,6 +779,7 @@ export default {
},
//
'CHANGE_DIRECTION':{
name:'改方',
operation:this.CTCCommand.assistPressDownTurnDirection.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION,
param:{
@ -774,6 +790,7 @@ export default {
},
//
'PICK_ASSIST':{
name:'接辅助',
// this.CTCCommand.assistPressDownTurnDirection.menu.operation
operation:this.CTCCommand.assistPressReceiveAssist.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_RECEIVE_ASSIST,
@ -784,6 +801,7 @@ export default {
},
//
'DEPART_ASSIST':{
name:'发辅助',
operation:this.CTCCommand.assistPressDeliverAssist.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_DELIVER_ASSIST,
param:{
@ -793,6 +811,7 @@ export default {
},
//
'ACCIDENT':{
name:'事故',
operation:this.CTCCommand.assistPressAccident.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_ACCIDENT,
param:{
@ -851,7 +870,7 @@ export default {
if (valid) {
operate.nextCmdType = modelTypeMap[model.type].nextCmdType;
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
this.$refs.password.doShow(operate, modelTypeMap[model.type].name);
}
}).catch((error) => {
console.error(error);
@ -887,6 +906,35 @@ export default {
float: left;
font-size: 13px;
height: 35px;
cursor: pointer;
border-bottom-width: 1px;
border-top-width: 1px;
border-right-width: 1px;
border-left-width: 1px;
border-color:#000;
// box-shadow: 2px 1px 3px #111010;
margin-left: 2px;
padding-left:3px;
padding-right:3px;
position: relative;
}
.button_box::before{
content: '';
width: 73px;
height: 100%;
position: absolute;
border-right: 1px #262626 solid;
left: 0px;
top: 0;
border-bottom: 1px #262626 solid;
border-left:0px;
border-top: 0px;
}
.button_box.downActive::before{
border-right:0px;
border-bottom: 0px;
border-left: 1px #262626 solid;
border-top: 1px #262626 solid;
}
.menu {
background-color: $bg;

View File

@ -1,302 +1,316 @@
<template>
<div v-if="dialogShow" id="faultChoose">
<!-- <div class="falutChooseTitle">ceshi</div>-->
<div class="card" style="padding: 5px;">
<div style="background: #999EA7;display: flex;align-items: center;">
<div class="button-box">
<img :src="t3Pic" class="img-button">
<img :src="t3Pic" class="img-button" @click.stop="activeMenu = 't3'" />
<settings-menu :items="T3MenuItems" v-if="activeMenu === 't3'" @select="handleT3MenuSelect" />
</div>
<div class="button-box">
<img :src="panelPic" class="img-button" @click="showLineBoard">
<img :src="panelPic" class="img-button" @click="showLineBoard" />
</div>
<div class="button-box">
<img :src="trainPic" class="img-button">
<img :src="trainPic" class="img-button" />
</div>
<div class="button-box">
<img :src="linkPic" class="img-button">
<img :src="linkPic" class="img-button" />
</div>
<div class="button-box">
<img :src="cameraPic" class="img-button">
<img :src="cameraPic" class="img-button" />
</div>
<div style="width: 205px;height: 36px; background: #fff;border-radius: 5px;" />
<div class="button-box">
<img :src="settingPic" class="img-button">
<img :src="settingPic" class="img-button" @click.stop="activeMenu = 'setting'" />
<settings-menu :items="settingsMenuItems" v-if="activeMenu === 'setting'" @select="handleSettingsMenuSelect" />
</div>
<div class="button-box">
<img :src="shutdownPic" class="img-button">
<img :src="shutdownPic" class="img-button" />
</div>
</div>
</div>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<BoardViewSetting ref="boardViewSetting" />
<RailViewSetting ref="railViewSetting" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { MouseEvent } from '@/scripts/ConstDic';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import T3Pic from '@/assets/ctc_icon/t3.png';
import TrainPic from '@/assets/ctc_icon/train.png';
import PanelPic from '@/assets/ctc_icon/panel.png';
import LinkPic from '@/assets/ctc_icon/link.png';
import CameraPic from '@/assets/ctc_icon/camera.png';
import SettingPic from '@/assets/ctc_icon/setting.png';
import ShutdownPic from '@/assets/ctc_icon/shutdown.png';
import { EventBus } from '@/scripts/event-bus';
import { mapGetters } from 'vuex'
import { MouseEvent } from '@/scripts/ConstDic'
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
import T3Pic from '@/assets/ctc_icon/t3.png'
import TrainPic from '@/assets/ctc_icon/train.png'
import PanelPic from '@/assets/ctc_icon/panel.png'
import LinkPic from '@/assets/ctc_icon/link.png'
import CameraPic from '@/assets/ctc_icon/camera.png'
import SettingPic from '@/assets/ctc_icon/setting.png'
import ShutdownPic from '@/assets/ctc_icon/shutdown.png'
import { EventBus } from '@/scripts/event-bus'
import SettingsMenu from './components/menu.vue'
import BoardViewSetting from './dialog/boardViewSetting.vue'
import RailViewSetting from './dialog/railViewSetting.vue'
export default {
name: 'RouteCreate',
components: {
NoticeInfo
},
data() {
return {
dialogShow: true,
loading: false,
selected: null,
t3Pic: T3Pic,
panelPic: PanelPic,
trainPic: TrainPic,
linkPic: LinkPic,
cameraPic: CameraPic,
settingPic: SettingPic,
shutdownPic: ShutdownPic
};
},
computed: {
...mapGetters('map', [
'stationList',
'sectionList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
name: 'MenuPanel',
components: {
NoticeInfo,
SettingsMenu,
BoardViewSetting,
RailViewSetting,
},
data() {
return {
dialogShow: true,
loading: false,
selected: null,
t3Pic: T3Pic,
panelPic: PanelPic,
trainPic: TrainPic,
linkPic: LinkPic,
cameraPic: CameraPic,
settingPic: SettingPic,
shutdownPic: ShutdownPic,
activeMenu: '',
settingsMenuItems: [
{ label: '占线板视图设置', id: 'boardView' },
{ label: '股道视图显示设置', id: 'railView' },
{
label: '方向显示设置',
id: 'directionView',
children: [{ label: '标准站', id: 'std' }, { label: '标准甲站', id: 'std1' }, { label: '标准乙站', id: 'std2' }],
},
createDisable() {
return !(this.groupNumber1 && this.groupNumber1.length === 4 && this.nowSectionCode && this.newTrainCode && this.newTrainCode.length === 8);
{
label: '调车参数配置',
id: 'shuntingParam',
children: [{ label: '标准站', id: 'std' }, { label: '标准甲站', id: 'std1' }, { label: '标准乙站', id: 'std2' }],
},
updateDisable() {
return !(this.newTrainCode && this.newTrainCode.length === 8);
{
label: '调车优先级配置',
id: 'shuntingPriority',
children: [{ label: '标准站', id: 'std' }, { label: '标准甲站', id: 'std1' }, { label: '标准乙站', id: 'std2' }],
},
moveDisable() {
return !this.newSectionCode;
{
label: '调车规则配置',
id: 'shuntingRule',
children: [{ label: '标准站', id: 'std' }, { label: '标准甲站', id: 'std1' }, { label: '标准乙站', id: 'std2' }],
},
deleteDisable() {
return !this.nowTrainCode;
}
},
watch: {
'$store.state.menuOperation.selectedCount':function(em) {
const device = this.$store.state.menuOperation.selected;
if (device && device.code && device._type === 'Section') {
this.nowSectionCode = device.code;
} else if (device && device.code && device._type === 'Train' && device._event === MouseEvent.Left) {
this.doShow(device);
}
}
},
mounted() {
this.dragEvent(); // 24
},
methods: {
doShow(selected) {
this.dialogShow = true;
this.$nextTick(function () {
this.dragEvent();
});
{
label: '功能按钮设置',
id: 'functionButton',
children: [{ label: '标准站', id: 'std' }, { label: '标准甲站', id: 'std1' }, { label: '标准乙站', id: 'std2' }],
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
showLineBoard() {
EventBus.$emit('showLineBoard');
},
dragEvent() {
const offset = this.offset;
const dragDom = document.querySelector('#faultChoose');
dragDom.style.cursor = 'move';
/** 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);*/
const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
dragDom.onmousedown = (e) => {
/** 鼠标按下,计算当前元素距离可视区的距离*/
const disX = e.clientX;
const disY = e.clientY;
/** 获取到的值带px 正则匹配替换*/
let styL, styT;
/** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/
if (sty.left.includes('%')) {
// eslint-disable-next-line no-useless-escape
styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
} else {
// eslint-disable-next-line no-useless-escape
styL = +sty.left.replace(/\px/g, '');
// eslint-disable-next-line no-useless-escape
styT = +sty.top.replace(/\px/g, '');
}
document.onmousemove = function (e) {
/** 通过事件委托,计算移动的距离*/
const l = e.clientX - disX;
const t = e.clientY - disY;
/** 移动当前元素*/
// dragDom.style.left = `${l + styL}px`;
// dragDom.style.top = `${t + styT}px`;
/** 移动当前元素*/
if (l + styL < 0) {
dragDom.style.left = `0px`;
} else if (l + styL > document.body.clientWidth - dragDom.clientWidth - 10) {
dragDom.style.left = `${document.body.clientWidth - dragDom.clientWidth - 10}px`;
} else {
dragDom.style.left = `${l + styL}px`;
}
if (t + styT <= offset) {
dragDom.style.top = offset + `px`;
} else if (t + styT > document.body.clientHeight - dragDom.clientHeight - 10) {
dragDom.style.top = `${document.body.clientHeight - dragDom.clientHeight - 10}px`;
} else {
dragDom.style.top = `${t + styT}px`;
}
/** 将此时的位置传出去*/
// binding.value({ x: e.pageX, y: e.pageY });
};
document.onmouseup = function () {
document.onmousemove = null;
document.onmouseup = null;
};
};
}
{ label: '站场界面显示设置', id: 'UIDisplay' },
{ label: '报警提示设置', id: 'alarm' },
{ label: '版本信息', id: 'version' },
],
T3MenuItems: [
{ label: '设置供电臂状态', id: 'powerSupplyArm', ctc: true },
{ label: '封锁设备操作', id: 'blockedDeviceOperation', ctc: true },
{ label: '区域批量设备操作', id: 'regionBatchOperation', children: [{}], ctc: true },
{ label: '站存车管理', id: 'stationTrainManage', children: [{}], ctc: true },
{ label: '设备影响分析', id: 'deviceAffectAnalyze', children: [{}], ctc: true },
{ label: '操作日志查询', id: 'operationLog', ctc: true },
{ label: '防溜设置查询', id: 'deviceAffectAnalyze', ctc: true },
{ label: '设备影响分析', id: 'deviceAffectAnalyze', ctc: true },
],
}
};
},
computed: {
...mapGetters('map', ['stationList', 'sectionList']),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break
},
createDisable() {
return !(
this.groupNumber1 &&
this.groupNumber1.length === 4 &&
this.nowSectionCode &&
this.newTrainCode &&
this.newTrainCode.length === 8
)
},
updateDisable() {
return !(this.newTrainCode && this.newTrainCode.length === 8)
},
moveDisable() {
return !this.newSectionCode
},
deleteDisable() {
return !this.nowTrainCode
},
},
watch: {
'$store.state.menuOperation.selectedCount': function(em) {
const device = this.$store.state.menuOperation.selected
if (device && device.code && device._type === 'Section') {
this.nowSectionCode = device.code
} else if (device && device.code && device._type === 'Train' && device._event === MouseEvent.Left) {
this.doShow(device)
}
},
},
mounted() {
this.dragEvent() // 24
window.addEventListener('click', this.closeMenus)
},
unmounted() {
window.removeEventListener('click', this.closeMenus)
},
methods: {
doShow(selected) {
this.dialogShow = true
this.$nextTick(function() {
this.dragEvent()
})
},
doClose() {
this.loading = false
this.dialogShow = false
this.$store.dispatch('training/emitTipFresh')
},
showLineBoard() {
EventBus.$emit('showLineBoard')
},
closeMenus() {
this.activeMenu = ''
},
handleSettingsMenuSelect(id) {
this.closeMenus()
const params = id.split('-')
switch (params[0]) {
case 'boardView':
this.$refs.boardViewSetting.doShow()
break
case 'railView':
this.$refs.railViewSetting.doShow()
break
}
},
handleT3MenuSelect(id) {
console.log(id)
},
dragEvent() {
const offset = this.offset
const dragDom = document.querySelector('#faultChoose')
dragDom.style.cursor = 'move'
/** 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);*/
const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
dragDom.onmousedown = e => {
/** 鼠标按下,计算当前元素距离可视区的距离*/
const disX = e.clientX
const disY = e.clientY
/** 获取到的值带px 正则匹配替换*/
let styL, styT
/** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/
if (sty.left.includes('%')) {
// eslint-disable-next-line no-useless-escape
styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
} else {
// eslint-disable-next-line no-useless-escape
styL = +sty.left.replace(/\px/g, '')
// eslint-disable-next-line no-useless-escape
styT = +sty.top.replace(/\px/g, '')
}
document.onmousemove = function(e) {
/** 通过事件委托,计算移动的距离*/
const l = e.clientX - disX
const t = e.clientY - disY
/** 移动当前元素*/
// dragDom.style.left = `${l + styL}px`;
// dragDom.style.top = `${t + styT}px`;
/** 移动当前元素*/
if (l + styL < 0) {
dragDom.style.left = `0px`
} else if (l + styL > document.body.clientWidth - dragDom.clientWidth - 10) {
dragDom.style.left = `${document.body.clientWidth - dragDom.clientWidth - 10}px`
} else {
dragDom.style.left = `${l + styL}px`
}
if (t + styT <= offset) {
dragDom.style.top = offset + `px`
} else if (t + styT > document.body.clientHeight - dragDom.clientHeight - 10) {
dragDom.style.top = `${document.body.clientHeight - dragDom.clientHeight - 10}px`
} else {
dragDom.style.top = `${t + styT}px`
}
/** 将此时的位置传出去*/
// binding.value({ x: e.pageX, y: e.pageY });
}
document.onmouseup = function() {
document.onmousemove = null
document.onmouseup = null
}
}
},
},
}
</script>
<style lang="scss">
#faultChoose .el-button--mini {
margin-left: 5px;
}
.triggerFaultListLeft{
display: inline-block;
float: left;
width: 730px;
}
// safariqq360
//
#faultChoose .el-table__body-wrapper::-webkit-scrollbar {
width: 6px;
height: 6px;
// height: 110px;
background-color: #FFFFFF;
width: 6px;
height: 6px;
// height: 110px;
background-color: #ffffff;
}
/*定义滚动条轨道 内阴影+圆角*/
#faultChoose .el-table__body-wrapper::-webkit-scrollbar-track {
// box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
background-color: #FFFFFF;;
// box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
background-color: #ffffff;
}
/*定义滑块 内阴影+圆角*/
#faultChoose .el-table__body-wrapper::-webkit-scrollbar-thumb {
border-radius: 10px;
// box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #eaeaea;
border-radius: 10px;
// box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #eaeaea;
}
/*滑块效果*/
#faultChoose .el-table__body-wrapper::-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;/*背景颜色*/
border-radius: 5px;
// box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
background: rgba(0, 0, 0, 0.4);
}
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
.triggerFaultInfo{
margin-bottom:10px;
padding: 10px 0px 10px 15px;
#faultChoose {
width: 510px;
position: absolute;
left: 50%;
top: 0;
border-radius: 6px;
z-index: 2009;
background-color: #e2e2e2;
}
.triggerFaultList{
font-size: 14px;
margin-top: 10px;
line-height: 20px;
.img-button {
width: 30px;
height: 30px;
background: #ebebeb;
border: 2px outset #fff;
border-radius: 5px;
}
.triggerFaultTitle{
font-size: 15px;
font-weight: bold;
.img-button:hover {
border: 2px outset #fff;
}
.falutChooseTitle{
cursor: all-scroll;
background-color: #c0c0c0;
height: 30px;
line-height: 30px;
color: #000;
padding-left: 10px;
border-radius: 6px 6px 0 0;
.img-button:active {
border: 2px inset #fff;
}
#faultChoose{
width: 510px;
position: absolute;
left: 50%;
top: 0;
border-radius: 6px;
z-index:2009;
background-color: #E2E2E2;
}
.faultChooseFoot{
display: inline-block;
float: right;
margin-right: 20px;
margin-top: 20px;
}
.closeFalutChoose{
position: absolute;
right: 0px;
top: 0px;
width: 30px;
height: 30px;
cursor: pointer;
line-height: 30px;
}
.closeFalutChooseIn{
font-size: 20px;
margin-left: 5px;
background-color: #f00;
color: #FFF;
border: 1px solid #fff;
border-radius: 5px;
}
.img-button{
width: 30px;
height: 30px;
background: #EBEBEB;
border: 2px inset #fff;
border-radius: 5px;
}
.img-button:hover{
border: 2px outset #fff;
}
.img-button:active{
border: 2px outset #fff;
}
.button-box{
padding: 3px;
background: #EBEBEB;
width: 36px;
height: 36px;
border-radius: 5px;
margin: 3px;
cursor: pointer;
.button-box {
padding: 3px;
background: #ebebeb;
width: 36px;
height: 36px;
border-radius: 5px;
margin: 3px;
cursor: pointer;
}
</style>

View File

@ -177,7 +177,7 @@ export default {
if (valid) {
operate.nextCmdType = CMD.ControlConvertMenu.CMD_CM_SPECIAL_STATION_CONTROL;
operate['operateNext'] = OperationEvent.Command.close.password.operation;
this.$refs.password.doShow(operate);
this.$refs.password.doShow(operate, '非常站控');
}
}).catch(error=>{
console.error(error);

View File

@ -34,7 +34,7 @@ import CancelMouseState from '@/mixin/CancelMouseState';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
import TrainStop from '@/jmapNew/theme/components/menus/dialog/trainStop';
@ -185,22 +185,22 @@ export default {
}
]
},
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
},
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
{
label: '越红灯行驶',
handler: this.handleOverEedLight
},
// {
// label: '',
// handler: this.nextStation
// },
// {
// label: '',
// handler: this.routeBlockRun
// },
// {
// label: '',
// handler: this.handleOverFuideSignal
// },
// {
// label: '',
// handler: this.handleOverEedLight
// },
// {
// label: '',
// handler: this.handleSpeedLimit
@ -211,12 +211,12 @@ export default {
},
{
label: '换端',
handler: this.handleTurnDirection
},
{
label: '发车',
handler: this.handleDepartTrain
handler: this.turnDirection
},
// {
// label: '',
// handler: this.handleDepartTrain
// },
{
label: '停车',
handler: this.handleParkingTrain
@ -303,25 +303,22 @@ export default {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() {
this.trainSend('Drive_Ahead');
this.trainSend(menuOperate.Driver.driveAhead);
},
routeBlockRun() {
this.trainSend('Route_Block_Drive');
this.trainSend(menuOperate.Driver.routeBlockDrive);
},
handleOverFuideSignal() {
this.trainSend('Drive_Through_The_Guide_Signal');
this.trainSend(menuOperate.Driver.driveThroughTheGuideSignal);
},
handleOverEedLight() {
this.trainSend('Drive_Through_The_Red_Light');
this.trainSend(menuOperate.Driver.driveThroughTheRedLight);
},
trainSend(type) {
const group = this.$route.query.group;
const param = {
commandType: type,
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
groupNumber: this.selected.code
};
commitTrainSend(group, param).then(({valid, operate})=>{
commitOperate(type, param, 3).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
@ -493,65 +490,35 @@ export default {
});
},
handlerApplyAmcMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'AM_C' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplySmcMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'SM_C' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyAmiMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'AM_I' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplySmiMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'SM_I' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyRmMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'RM' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
@ -576,33 +543,13 @@ export default {
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;
const param = {
commandType: 'Turn_Direction',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleDepartTrain() {
const group = this.$route.query.group;
const param = {
commandType: 'Depart_Train',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
// handleDepartTrain() {
// commitOperate( menuOperate.Driver.departTrain, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
// }).catch((error)=> {
// console.error(error);
// this.$refs.noticeInfo.doShow();
// });
// },
handleParkingTrain() {
commitOperate(menuOperate.Train.driverStop, {groupNumber:this.selected.groupNumber}, 0).then(({valid, operate})=>{
if (valid) {

View File

@ -45,7 +45,7 @@
</div>
<div class="runplanMenuButton">
<div class="runplanLine" />
<div class="rpDispacherCommand runplanClickBtn">调度命令</div>
<div class="rpDispacherCommand runplanClickBtn" :class="{flicker: hasCommandMsg, redFlick: hasCommandMsg}" @click="showCmdManage">调度命令</div>
<div class="runplanBtnGroup">
<div id="stageRunplan" class="runplanClickBtn" @click="stageRunplan">阶段计划(F8)</div>
<div id="sendRunplan" class="runplanClickBtn" @click="sendRunplan">发送计划</div>
@ -563,6 +563,8 @@
<modify-trip-number ref="modifyTripNumber" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" />
<train-runplan ref="trainRunplan" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<cmdManage ref="cmdManage" />
<signedCmd ref="signedCmd" @signedCmdClose="signedCmdClose" @changeSignedStatus="changeSignedStatus" />
</div>
</template>
<script>
@ -590,8 +592,10 @@ import ModifyTripNumber from './dialog/modifyTripNumber';
import TrainRunplan from './dialog/trainRunplan';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { copyAssign } from '@/utils/index';
import { mapGetters } from 'vuex';
import { mapGetters, mapState } from 'vuex';
import { transfiniteList } from '@/scripts/ConstDic';
import cmdManage from '@/views/dispatcherStationManage/cmdManage.vue';
import signedCmd from '@/views/dispatcherStationManage/signedCmd.vue';
export default {
name:'RunplanPane',
components: {
@ -601,6 +605,8 @@ export default {
ModifyAdjacentStation,
ModifyTripNumber,
TrainRunplan,
cmdManage,
signedCmd,
NoticeInfo
},
data() {
@ -642,6 +648,16 @@ export default {
...mapGetters('map', [
'sectionList'
]),
...mapState('socket', [
'dispatchCommandMsg'
]),
hasCommandMsg() {
let status = false;
if (this.dispatchCommandMsg.body) {
status = true;
}
return status;
},
mapStationDirectionData() {
return this.$store.state.map.mapStationDirectionData;
}
@ -676,6 +692,19 @@ export default {
}
},
methods:{
changeSignedStatus(info) {
this.$refs.cmdManage.changeSignedStatus(info);
},
signedCmdClose() {
this.$refs.cmdManage.doShow();
},
showCmdManage() {
if (this.hasCommandMsg) {
this.$refs.signedCmd.doShow();
} else {
this.$refs.cmdManage.doShow();
}
},
initDate(date) {
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}:${prefixIntrger(date.getSeconds(), 2)}`;
const years = date.getFullYear() + '';
@ -1214,6 +1243,23 @@ export default {
};
</script>
<style lang="scss" scoped>
.redFlick {
background: red !important;
}
@keyframes fade {
from {
opacity: 1.0;
}
50% {
opacity: 0.2;
}
to {
opacity: 1.0;
}
}
.flicker {
animation: fade 600ms infinite;
}
.runplanPane{
width: 100%;
height: calc(100% - 34px);

View File

@ -308,7 +308,7 @@ export default {
</script>
<style lang="scss" scoped>
.redFlick {
background: red;
background: red !important;
}
@keyframes fade {
from {

View File

@ -33,7 +33,7 @@ import CancelMouseState from '@/mixin/CancelMouseState';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import TrainStop from '@/jmapNew/theme/components/menus/dialog/trainStop';
export default {
@ -182,34 +182,34 @@ export default {
}
]
},
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
},
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
{
label: '越红灯行驶',
handler: this.handleOverEedLight
},
// {
// label: '',
// handler: this.nextStation
// },
// {
// label: '',
// handler: this.routeBlockRun
// },
// {
// label: '',
// handler: this.handleOverFuideSignal
// },
// {
// label: '',
// handler: this.handleOverEedLight
// },
// {
// label: '',
// handler: this.handleDriveTo
// },
{
label: '换端',
handler: this.handleTurnDirection
},
{
label: '发车',
handler: this.handleDepartTrain
handler: this.turnDirection
},
// {
// label: '',
// handler: this.handleDepartTrain
// },
{
label: '停车',
handler: this.handleParkingTrain
@ -246,7 +246,6 @@ export default {
initMenu() {
//
this.menu = MenuContextHandler.covert(this.menuNormal);
console.log(this.menu, '================');
//
if (this.operatemode === OperateMode.FAULT) {
// if (!this.$store.state.scriptRecord.bgSet) {
@ -294,25 +293,19 @@ export default {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() {
this.trainSend('Drive_Ahead');
this.trainSend(menuOperate.Driver.driveAhead);
},
routeBlockRun() {
this.trainSend('Route_Block_Drive');
this.trainSend(menuOperate.Driver.routeBlockDrive);
},
handleOverFuideSignal() {
this.trainSend('Drive_Through_The_Guide_Signal');
this.trainSend(menuOperate.Driver.driveThroughTheGuideSignal);
},
handleOverEedLight() {
this.trainSend('Drive_Through_The_Red_Light');
this.trainSend(menuOperate.Driver.driveThroughTheRedLight);
},
trainSend(type) {
const group = this.$route.query.group;
const param = {
commandType: type,
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
commitOperate(type, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
@ -481,65 +474,35 @@ export default {
});
},
handlerApplyAmcMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'AM_C' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_C' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplySmcMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'SM_C' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_C' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyAmiMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'AM_I' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'AM_I' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplySmiMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'SM_I' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'SM_I' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyRmMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'RM' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
commitOperate(menuOperate.Driver.changePreselectionMode, { groupNumber: this.selected.code, preselectionMode: 'RM' }, 3).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
@ -564,33 +527,13 @@ export default {
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;
const param = {
commandType: 'Turn_Direction',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleDepartTrain() {
const group = this.$route.query.group;
const param = {
commandType: 'Depart_Train',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
// handleDepartTrain() {
// commitOperate(menuOperate.Driver.departTrain, { groupNumber: this.selected.groupNumber }, 3).then(({valid, operate}) => {
// }).catch((error)=> {
// console.error(error);
// this.$refs.noticeInfo.doShow();
// });
// },
handleParkingTrain() {
commitOperate(menuOperate.Train.driverStop, {groupNumber:this.selected.groupNumber}, 0).then(({valid, operate})=>{
if (valid) {
@ -607,8 +550,7 @@ export default {
},
removeTripNumber() {
commitOperate(menuOperate.Train.removeTrip, {groupNumber:this.selected.groupNumber}, 3).then(({valid, operate})=>{
if (valid) {
}
// if (valid) {}
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();

View File

@ -42,7 +42,7 @@
</div>
<div class="runplanMenuButton">
<div class="runplanLine" />
<div class="rpDispacherCommand runplanClickBtn">调度命令</div>
<div class="rpDispacherCommand runplanClickBtn" :class="{flicker: hasCommandMsg, redFlick: hasCommandMsg}" @click="showCmdManage">调度命令</div>
<div class="runplanBtnGroup">
<div id="stageRunplan" class="runplanClickBtn" @click="stageRunplan">阶段计划(F8)</div>
<div id="sendRunplan" class="runplanClickBtn" @click="sendRunplan">发送计划</div>
@ -489,6 +489,8 @@
<delete-runplan ref="deleteRunplan" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" />
<modify-trip-number ref="modifyTripNumber" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<cmdManage ref="cmdManage" />
<signedCmd ref="signedCmd" @signedCmdClose="signedCmdClose" @changeSignedStatus="changeSignedStatus" />
</div>
</template>
<script>
@ -512,7 +514,9 @@ import ModifyAdjacentStation from './dialog/modifyAdjacentStation';
import ModifyTripNumber from './dialog/modifyTripNumber';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { copyAssign } from '@/utils/index';
import { mapGetters } from 'vuex';
import { mapGetters, mapState } from 'vuex';
import cmdManage from '@/views/dispatcherStationManage/cmdManage.vue';
import signedCmd from '@/views/dispatcherStationManage/signedCmd.vue';
export default {
name:'RunplanPane',
components: {
@ -521,7 +525,9 @@ export default {
DeleteRunplan,
ModifyAdjacentStation,
ModifyTripNumber,
NoticeInfo
NoticeInfo,
cmdManage,
signedCmd
},
data() {
return {
@ -552,7 +558,17 @@ export default {
computed: {
...mapGetters('map', [
'sectionList'
])
]),
...mapState('socket', [
'dispatchCommandMsg'
]),
hasCommandMsg() {
let status = false;
if (this.dispatchCommandMsg.body) {
status = true;
}
return status;
}
},
watch:{
'$store.state.socket.railCtcRunplanChange': function (val) {
@ -565,6 +581,19 @@ export default {
// railwaySimulationRunplanSendChange
},
methods:{
changeSignedStatus(info) {
this.$refs.cmdManage.changeSignedStatus(info);
},
signedCmdClose() {
this.$refs.cmdManage.doShow();
},
showCmdManage() {
if (this.hasCommandMsg) {
this.$refs.signedCmd.doShow();
} else {
this.$refs.cmdManage.doShow();
}
},
getRailwaySimulationRunplanSend() {
const stationCode = this.$store.state.training.roleDeviceCode;
const railwaySimulationRunplanSendMap = this.$store.state.socket.railwaySimulationRunplanSendMap;
@ -814,6 +843,24 @@ export default {
};
</script>
<style lang="scss" scoped>
.redFlick {
background: red !important;
}
@keyframes fade {
from {
opacity: 1.0;
}
50% {
opacity: 0.2;
}
to {
opacity: 1.0;
}
}
.flicker {
animation: fade 600ms infinite;
}
.runplanPane{
width: 100%;
height: calc(100% - 34px);

View File

@ -0,0 +1,292 @@
<template>
<div v-show="showTable" style="background: #F0F0F0;z-index: 10;position: absolute;left: 0;bottom: 0;width: 100%;font-size: 14px;">
<i class="el-icon-close close_icon" @click.stop="doClose" />
<el-row>
<el-col :span="11" style="padding: 0 10px;">
<div style="border: 1px solid #C7C7C7;margin-top: 10px;">
<div style="position: relative; top: -8px;left: 15px;width: 130px;background: #f0f0f0;">列车进路序列 可修改</div>
<div style="width: 100%;background: #9F9F9F">
<el-table
ref="sequenceTable"
:data="sequenceList"
height="90"
:row-class-name="tableRowClassName"
border
style="width: 650px"
:cell-style="{padding: 0}"
:default-sort="{prop: 'startTime', order: 'ascending'}"
>
<el-table-column type="index" width="30" label="序" label-class-name="bottom-table-label-header" />
<el-table-column property="tripNumber" label="车次" width="60" label-class-name="bottom-table-label-header">
<template slot-scope="scope">
<div style="width: 100%;height: 22px;" @contextmenu="popMenuShow(scope.row, '' ,$event)">{{ scope.row.tripNumber }}</div>
</template>
</el-table-column>
<el-table-column property="trackName" label="股道" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="autoTrigger" label="自触" width="50" label-class-name="bottom-table-label-header">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.autoTrigger" @change="triggerChange(scope.row)" />
</template>
</el-table-column>
<el-table-column property="direction" label="方向" width="100" label-class-name="bottom-table-label-header" />
<el-table-column property="startTime" label="开始" width="80" label-class-name="bottom-table-label-header" />
<el-table-column property="planTime" label="计划" width="90" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="状态" width="90" label-class-name="bottom-table-label-header">
<template slot-scope="scope">
<span>{{ getRouteStatus(scope.row.status) }}</span>
</template>
</el-table-column>
<el-table-column property="description" label="进路描述" label-class-name="bottom-table-label-header">
<template slot-scope="scope">
<span>{{ getRouteName(scope.row.routeCode) }}</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div style="display: flex;align-items: center;">
<div style="margin-right: 10px;">车站</div>
<el-select v-model="stationCode" size="mini" @change="stationChange">
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">释放权限</div>
<div style="margin-left: 10px;">字体</div>
<div style="margin-left: 10px;border: 1px inset #C7C7C7;padding: 3px;">常规</div>
</div>
</el-col>
<el-col :span="13">
<div style="border: 1px solid #C7C7C7;margin-top: 10px;">
<div style="position: relative; top: -8px;left: 15px;width: 103px;background: #f0f0f0;">调车进路 可修改</div>
<el-row>
<el-col :span="12" style="padding: 0 10px;">
<div style="border: 1px solid #C7C7C7;">
<div style="position: relative; top: -8px;left: 15px;width: 86px;background: #f0f0f0;">调车进路序列</div>
<div style="width: 100%;background: #9F9F9F">
<el-table :data="tableData" height="55" border style="width: 465px" :cell-style="{padding: 0}">
<el-table-column type="index" label="顺序" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="勾序" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="进路及方向" width="95" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="自触" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="状态" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="触发时间" width="80" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="占用时间" label-class-name="bottom-table-label-header" />
</el-table>
</div>
</div>
</el-col>
<el-col :span="12" style="padding: 0 10px;">
<div style="border: 1px solid #C7C7C7;">
<div style="position: relative; top: -8px;left: 15px;width: 44px;background: #f0f0f0;">勾序列</div>
<div style="width: 100%;background: #9F9F9F">
<el-table :data="tableData" height="55" style="width: 360px" border :cell-style="{padding: 0}">
<el-table-column type="index" label="钩计划" width="70" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="股道" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="操作" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="状态" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="记事" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="作业时间" label-class-name="bottom-table-label-header" />
</el-table>
</div>
</div>
</el-col>
</el-row>
</div>
<el-row>
<div style="display: flex;align-items: center;">
<div>作业单</div>
<el-select v-model="sheetValue" size="mini" style="margin-left: 10px;width: 500px;">
<el-option
v-for="item in sheetList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">单头信息</div>
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">删除</div>
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">发送</div>
</div>
</el-row>
<el-row>
<div style="display: flex;">
<div>历史进路</div>
<div style="margin-left: 300px;">状态</div>
</div>
</el-row>
</el-col>
</el-row>
<pop-menu ref="popMenu" :menu="menu" style="background: #DFE3E6;" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { EventBus } from '@/scripts/event-bus'; // 996
import { menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import PopMenu from '@/components/PopMenu';
export default {
name: 'BottomTable',
components: {
PopMenu
},
data() {
return {
tableData: [{}],
stationCode: '',
sheetValue: '',
routeParam: {},
showTable: false,
sheetList: [{ label: '历史进路', value: 'historyRoute' }],
sequenceList: [],
sequenceMap: {},
menu: [{label: '人工触发', handler: this.artificialTrigger, disabled: false}, {label: '删除', handler: this.artificialTrigger, disabled: true}]
};
},
computed: {
...mapGetters('map', [
'stationList'
])
},
watch: {
'showTable': function (val) {
const offset = val ? 162 : 0;
EventBus.$emit('setMenuButtonPosition', offset);
},
'$store.state.socket.railCtcStatusMsg': function (val) {
if (val && val.length) {
val.forEach(item => {
if (item && item.routeSequence && item.routeSequence.lines && item.routeSequence.lines.length) {
item.routeSequence.lines.forEach(elem => {
if (!this.sequenceMap[elem.id]) {
this.sequenceMap[elem.id] = Object.assign(elem, { stationCode: item.stationCode, readOnly: item.readOnly });
} else {
this.sequenceMap[elem.id] = Object.assign(this.sequenceMap[elem.id], elem, { stationCode: item.stationCode, readOnly: item.readOnly });
}
});
}
});
this.sequenceList = [];
for (const key in this.sequenceMap) {
if (this.sequenceMap[key].stationCode === this.stationCode) {
this.sequenceList.push(this.sequenceMap[key]);
}
}
}
}
},
mounted() {
EventBus.$on('bottomTableShowOrHidden', () => {
this.showTable = !this.showTable;
});
if (this.stationList && this.stationList.length) {
this.stationCode = this.stationList[0].code;
}
},
methods: {
doShow() {
this.showTable = true;
},
doClose() {
this.showTable = false;
},
getRouteStatus(status) {
if (status === '2') {
return '触发完成';
} else if (status === '1') {
return '正在触发';
} else {
return '等待中';
}
},
triggerChange(row) {
const triggerParam = { stationCode: this.stationCode, tripNumber: row.tripNumber, routeCode: row.routeCode, trigger: row.autoTrigger };
if (row.autoTrigger) {
this.setTrigger(triggerParam, row);
} else {
this.cancelTrigger(triggerParam, row);
}
},
stationChange(stationCode) {
this.sequenceList = [];
for (const key in this.sequenceMap) {
if (this.sequenceMap[key].stationCode === stationCode) {
this.sequenceList.push(this.sequenceMap[key]);
}
}
},
tableRowClassName({row, rowIndex}) {
if (row.status === '0') {
return 'bottom-table-route-wait';
} else if (row.tripNumber) {
return 'bottom-table-route-green';
} else {
return 'bottom-table-route-gray';
}
},
getRouteName(code) {
if (code) {
const route = this.$store.state.map.routeData[code];
return route ? route.name : '';
} else { return ''; }
},
setTrigger(triggerParam, row) {
commitOperate(menuOperate.CTC.autoTrigger, triggerParam, 3).then(({valid, operate})=>{
if (valid) {
this.$message.success('设置自动触发成功!');
}
}).catch((e) => {
console.error(e);
row.autoTrigger = false;
this.$message.error('设置自动触发失败!');
});
},
popMenuShow(item, type, e) {
this.routeParam = {routeCode: item.routeCode, tripNumber: item.tripNumber, force: false, duration: null};
this.$refs.popMenu.resetShowPosition({x: e.x, y:e.y});
},
cancelTrigger(triggerParam, row) {
commitOperate(menuOperate.CTC.autoTrigger, triggerParam, 3).then(({valid, operate})=>{
if (valid) {
this.$message.success('取消自动触发成功!');
}
}).catch((e) => {
console.error(e);
row.autoTrigger = true;
this.$message.error('取消自动触发失败!');
});
},
artificialTrigger() {
commitOperate(menuOperate.CTC.setRoute, this.routeParam, 3).then(({valid, operate})=>{
if (valid) {
this.$message.success('人工触发成功!');
}
}).catch((e) => {
console.error(e);
this.$message.error('人工触发失败!');
});
}
}
};
</script>
<style scoped>
</style>
<style>
.bottom-table-label-header{
background: #FFF3EE;
}
.bottom-table-route-wait {
background: #ff0 !important;
}
.bottom-table-route-gray{
background: #c0c0c0 !important;
}
.bottom-table-route-green{
background: #0f0 !important;
}
</style>

View File

@ -0,0 +1,210 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="11">车次号</el-col>
<el-col :span="11" :offset="1">上下行</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="addModel.tripNumber" size="mini" @blur="handleTripNumber" />
<div class="tripNumberTips">{{ messageTip1 }}</div>
</el-col>
<el-col :span="11" :offset="1">
<el-select v-model="addModel.right" size="mini" disabled>
<el-option :value="true" :label="rightTrueLabel" />
<el-option :value="false" :label="rightFalseLabel" />
</el-select>
<div class="tripNumberTips">{{ messageTip2 }}</div>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
export default {
name: 'TrainSetPlan',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
messageTip1:'',
messageTip2:'',
addModel: {
tripNumber: '',
right: '',
sectionCode: ''
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'mapConfig'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
},
title() {
return '模拟车次输入';
},
rightTrueLabel() {
return this.mapConfig.upRight ? '上行' : '下行';
},
rightFalseLabel() {
return this.mapConfig.upRight ? '下行' : '上行';
}
},
watch:{},
methods: {
doShow(operate, selected) {
this.$root.$emit('dialogOpen', selected);
this.selected = selected;
//
this.addModel.sectionCode = selected.code;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.addModel = {
tripNumber: '',
right: '',
sectionCode: ''
};
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected);
},
handleTripNumber() {
const figuresOfServiceMinNumber = 2;
const figuresOfServiceMaxNumber = 6;
// this.$store.state.map.mapConfig.figuresOfServiceNumber;
const tripNumber = this.addModel.tripNumber;
const judge = /^[a-zA-Z0-9]*[\d]$/.test(this.addModel.tripNumber);
if (judge) {
if (tripNumber.toString().length > figuresOfServiceMaxNumber || tripNumber.toString().length < figuresOfServiceMinNumber) {
this.messageTip1 = '车次号长度' + figuresOfServiceMinNumber + '-' + figuresOfServiceMaxNumber + '位';
} else {
this.addModel.tripNumber = tripNumber;
this.messageTip1 = '';
const result = this.addModel.tripNumber.match(/[\d]$(?=[a-zA-Z0-9]*)/);
if (result) {
const is_even = result[0] % 2 == 0;
this.addModel.right = is_even;
}
}
} else {
this.addModel.tripNumber = '';
this.messageTip1 = '请输入车次号(最后一位必须是数字)';
}
},
commit() {
const figuresOfServiceMinNumber = 2;
const figuresOfServiceMaxNumber = 6;
let result = false;
const tripNumber = this.addModel.tripNumber;
if (tripNumber.toString().length > figuresOfServiceMaxNumber || tripNumber.toString().length < figuresOfServiceMinNumber) {
result = false;
} else {
result = true;
}
if (this.addModel.tripNumber && result) {
// if (this.addModel.right === '') {
// this.messageTip2 = '';
// return;
// }
const params = {
tripNumber: this.addModel.tripNumber,
sectionCode: this.addModel.sectionCode,
right: this.addModel.right
};
this.messageTip1 = '';
this.loading = true;
commitOperate(menuOperate.Section.addSpareTrain, params, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
if (this.addModel.tripNumber) {
this.messageTip1 = '该车次号长度' + figuresOfServiceMinNumber + '-' + figuresOfServiceMaxNumber + '位';
} else {
this.messageTip1 = '请输入车次号';
}
}
},
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 rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row {
margin: 10px
}
.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;
}
.tripNumberTips{
margin-top: 7px;
color: #f00;
font-size: 13px;
}
</style>

View File

@ -0,0 +1,141 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm confirm-control"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<template v-for="(message, index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'ConfirmControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯';
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
return OperationEvent.Signal.signalClose.confirm.domId;
}
}
return '';
}
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
this.signalClose();
}
},
//
signalClose() {
const operate = {
over: true,
operation: OperationEvent.Signal.signalClose.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
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>
.confirm-control .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

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

View File

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

View File

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

View File

@ -0,0 +1,193 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
title="密码校验"
:close-on-click-modal="false"
append-to-body
>
<el-row>
<el-col :span="22" :offset="1">
<el-input v-model="encryptionPassword" placeholder="请使用软键盘输入" size="medium" :disabled="true" />
</el-col>
</el-row>
<el-row v-if="showMistake">
<el-col :span="22" :offset="1">
<span class="password-error">*密码输入错误请重新输入*</span>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">7</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">8</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">9</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">4</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">5</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">6</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">1</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">2</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">3</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">0</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputClear">C</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="backSpace"> &lt; </el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="12">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'PasswordBox',
data() {
return {
/* 写死的初始密码*/
correctPassword: '123',
dialogShow: false,
operation: '',
checkHasInput: false,
/* 输入值*/
passwordCheck: '',
/* 输入值替换为对应长度的星号*/
encryptionPassword: '',
loading: false,
showMistake: false
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.password.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
}
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
if (operate.operateNext) {
this.operation = operate.operateNext;
}
this.dialogShow = true;
this.checkHasInput = false;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.showMistake = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() { //
if (this.passwordCheck === this.correctPassword) {
this.$emit('checkOver', this.operate);
this.doClose();
this.inputClear();
} else {
this.showMistake = true;
}
},
/* 软键盘输入*/
inputNum(e) {
this.showMistake = false;
this.passwordCheck += e.path[0].innerText;
this.encryptionPassword = this.passwordCheck.replace(/./g, '*');
},
/* 软键盘清除*/
inputClear() {
this.showMistake = false;
this.passwordCheck = '';
this.encryptionPassword = '';
},
/* 软键盘回退*/
backSpace() {
this.showMistake = false;
const password = this.passwordCheck;
if (password !== '') {
this.passwordCheck = password.substring(0, password.length - 1);
this.encryptionPassword = this.passwordCheck;
}
},
cancel() {
const operate = {
send: false,
type: this.operate.type,
operation: OperationEvent.Command.cancel.password.operation
};
this.$emit('checkCancel');
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.inputClear();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.loading = false;
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow();
});
}
}
};
</script>
<style>
.notice-info .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
.password-error {
color: red;
}
</style>

View File

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

View File

@ -0,0 +1,137 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm route-hand-control"
:title="title"
:visible.sync="show"
width="260px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="table">
<div v-for="(temp,index) in tempTable" :key="index" class="eachShunt">
<div class="shuntingName">{{ temp.name }}</div>
<div class="shuntingSelected">
<el-checkbox v-model="temp.selected" size="medium" />
</div>
</div>
</div>
<el-row justify="center" class="button-group">
<el-col :span="9" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="9" :offset="3">
<el-button :id="domIdCancel" @click="cancel">退出</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'DefectiveShunting',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
title:'分路不良',
loading:false,
sectionCode:'',
tempTable:[]
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Section.defectiveShunting.confirm.domId : '';
}
},
methods:{
doShow({switchSection, code, shuntingTypeList = ''}) {
this.sectionCode = code;
if (switchSection) {
this.tempTable = [
{name:'岔前不良', selected:shuntingTypeList.includes('SWITCH_FRONT_SHUNTING'), value:'SWITCH_FRONT_SHUNTING'},
{name:'定位不良', selected:shuntingTypeList.includes('FIXED_POSITION_SHUNTING'), value:'FIXED_POSITION_SHUNTING'},
{name:'反位不良', selected:shuntingTypeList.includes('REVERSE_POSITION_SHUNTING'), value:'REVERSE_POSITION_SHUNTING'}
];
} else {
this.tempTable = [{
name:'分路不良',
selected:shuntingTypeList.includes('SECTION_SHUNTING'),
value:'SECTION_SHUNTING'
}];
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const shuntingTypeList = [];
this.tempTable.forEach(each=>{
if (each.selected) {
shuntingTypeList.push(each.value);
}
});
const operate = {
over: true,
code:this.sectionCode,
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
operation: OperationEvent.Section.defectiveShunting.confirm.operation,
param:{
sectionCode:this.sectionCode,
shuntingTypeList:shuntingTypeList
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch((error) => { this.doClose(); this.$refs.noticeInfo.doShow(); console.log(error); });
},
cancel() {
const operate = {
over: true,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style lang="scss" scoped>
.shuntingName{
display: inline-block;
width: 90px;
padding: 4px 0px;
background: #fff;
border-radius: 5px;
border: 1px #bfbfbf solid;
text-align: center;
}
.shuntingSelected{display: inline-block;margin-left: 5px;}
.eachShunt{margin-top:3px;text-align: center;}
</style>

View File

@ -0,0 +1,99 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
:title="title"
:visible.sync="show"
width="280px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="text-align: center;">
确定删除该列车的行车信息
</div>
<el-row justify="center" class="button-group" style="margin-top:20px">
<el-col :span="8" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="3">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'DeleteRunplan',
data() {
return {
dialogShow: false,
loading: false,
model:{
stationCode:'',
runPlanCode:''
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.deleteRunplan.menu.domId : '';
},
title() {
return '警告';
}
},
methods: {
doShow(row) {
// 4. CTC_REMOVE_RUN_PLAN stationCode runPlanCode
this.model.stationCode = row.stationCode;
this.model.runPlanCode = row.code;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.loading = true;
commitOperate(menuOperate.CTC.deleteRunplan, this.model, 2).then(({valid})=>{
this.loading = false;
this.$emit('clearRpRow');
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('clearRpRow');
this.doClose();
this.$emit('noticeInfo');
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$emit('clearRpRow');
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -0,0 +1,163 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div>
<el-form v-if="selected" :inline="true" :model="form" class="demo-form-inline">
<el-form-item label="设备类型:">
<el-select v-model="form.deviceType" :disabled="true" style="width: 150px;">
<el-option
v-for="item in deviceTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="设备名称:">
<el-input v-model="form.deviceName" :disabled="true" style="width: 150px;" />
</el-form-item>
</el-form>
<el-card>
<el-table
v-loading="loading"
:data="tableData"
style="width: 100%"
>
<el-table-column
prop="fileName"
label="文件"
width="400"
/>
<el-table-column
prop="name"
label="操作"
>
<template slot-scope="scope">
<div class="text-button" @click="openPdf(scope.row)">打开</div>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import CancelMouseState from '@/mixin/CancelMouseState';
import { getUploadFile } from '@/api/pdf';
import { DrawingType } from '@/scripts/ConstDic';
export default {
name: 'TrainMove',
mixins: [
CancelMouseState
],
data() {
return {
selected: null,
selectedType: '',
dialogShow: false,
loading: false,
tableData: [],
deviceTypeList: [
{ label: '区段', value: 'Section' },
{ label: '信号机', value: 'Signal' },
{ label: '道岔', value: 'Switch' },
{ label: '车站', value: 'Station' }
],
deviceIdList: [],
form: {
mapId: '',
deviceId: '',
deviceCode: '',
deviceName: ''
}
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.selectedType === 'normStudy') {
return '规范学习';
} else if (this.selectedType === 'clCaAn') {
return '经典案例分析';
} else if (this.selectedType === 'baDeTr') {
return '基础设备培训';
} else {
return '图纸检索';
}
}
},
methods: {
doShow(selected, selectedType) {
this.selectedType = selectedType;
const params = { mapId: this.$route.query.mapId, fileType: DrawingType[selectedType] };
this.selected = selected;
if (this.selected) {
this.form.deviceName = selected.name;
this.form.deviceType = selected._type;
params.deviceType = selected._type.toUpperCase();
params.deviceId = selected.code;
}
this.loading = true;
getUploadFile(params).then(resp => {
this.tableData = resp.data;
this.loading = false;
}).catch(() => {
this.loading = false;
this.$message.error('图纸检索失败!');
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
openPdf(row) {
const url = `https://joylink.club/oss/joylink/${row.filePath}`;
window.open(url, '_blank');
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
}
}
};
</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;
}
.text-button{
color: #148ad0;
cursor:pointer;
}
.text-button:active{
color: #b938e1;
text-decoration: underline;
}
.text-button:hover{
color: #b938e1;
text-decoration: underline;
}
</style>

View File

@ -0,0 +1,244 @@
<template>
<div
ref="jlmapCanvas"
class="jlmap-canvas"
:style="{ width: width + 'px', height: height + 'px' }"
>
<div :id="canvasId" class="display_canvas" />
</div>
</template>
<script>
import Jlmap from '@/jmapNew/map';
import { parserFactory, ParserType } from '@/jmapNew/parser';
import { deepAssign } from '@/utils/index';
import deviceType from '@/jmapNew/constant/deviceType';
export default {
name: 'JLocalmapVisual',
props: {
width: {
type: Number,
default: 0
},
height: {
type: Number,
default: 0
},
mapData: {
type: Object,
defautl() {
return {};
}
}
},
data() {
return {
loading: true,
offset: {
x: 0,
y: 0
},
map: null,
mapDevice: {},
routeData: [],
autoReentryData: []
};
},
computed: {
canvasId() {
return ['map', Math.random().toFixed(5) * 100000].join('_');
}
},
watch: {
'$store.state.config.canvasSizeCount': function (val) {
this.resetSize();
}
// '$store.state.training.prdType': function (val) {
// if (val) {
// this.changePrdType(val);
// }
// }
},
mounted() {
this.init();
},
beforeDestroy() {
if (this.map) {
this.map.dispose();
this.map = null;
}
},
methods: {
init() {
document.getElementById(this.canvasId).oncontextmenu = function (e) {
return false;
};
const prdType = this.$store.state.training.prdType;
let showMode = '';
if (prdType == '01') {
showMode = '03';
} else if (prdType == '02') {
showMode = '02';
}
if (!this.map) {
this.map = new Jlmap({
dom: document.getElementById(this.canvasId),
config: {
renderer: 'canvas',
width: this.width,
height: this.height
},
options: {
scaleRate: 1,
offsetX: 0,
offsetY: 0,
zoomOnMouseWheel: false
},
showConfig: {
prdType: prdType,
previewOrMapDraw: true,
showMode: showMode
},
methods: {}
});
}
window.document.oncontextmenu = function () {
return false;
};
if (this.mapData && this.mapData.skinVO) {
const parser = parserFactory(ParserType.Graph.value);
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
}
},
loadData() {
try {
this.setMap(this.mapData, this.mapDevice);
} catch (error) {
console.log('[ERROR] ', error);
}
},
//
setMap(data, mapDevice) {
if (data.skinVO) {
this.routeData = this.$store.state.map.routeData;
this.autoReentryData = this.$store.state.map.autoReentryData;
this.map.setMap(data, mapDevice, {
routeData: this.routeData,
autoReentryData: this.autoReentryData
});
this.setMapFree();
} else {
this.mapDevice = {};
this.map.clear();
}
},
// jlmap
resetSize() {
this.$nextTick(() => {
this.map && this.map.resize({ width: this.width, height: this.height });
});
},
//
setLevelVisible(levels) {
this.map && this.map.setLevelVisible(levels);
},
setMapFree() {
const list = [];
Object.values(this.mapDevice).forEach((elem) => {
const code = elem.code;
const type = elem._type;
//
type != deviceType.Train &&
list.push({ code, _type: type, _free: true });
});
this.map.update(list, false);
},
//
setCenterWithOffset(code, dx, y) {
this.map.setCenterWithOffset(code, dx, y - this.height / 2);
},
//
updateMapDevice(elems) {
const list = [];
elems.forEach((elem) => {
if (elem.code) {
list.push(deepAssign(this.mapDevice[elem.code], elem));
}
});
this.map.update(list, false);
},
getDeviceByCode(code) {
return this.mapDevice[code];
},
setShowStation(stationCode, setCenter) {
const list = [];
const mapDevice = this.$store.state.map.mapDevice;
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.map.updateShowStation(list, stationCode);
!setCenter && this.setCenter(stationCode);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.mask {
opacity: 0;
background: #000;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 9;
}
.jlmap-canvas {
position: relative;
-moz-user-select: none;
-o-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
background: #000;
float: left;
}
.title {
text-align: right;
font-size: 14px;
color: #606266;
line-height: 32px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-weight: 700;
}
.zoom-view {
position: absolute;
bottom: 0;
background: #fff;
padding-top: 5px;
height: 42px;
border-bottom: 1px #f3f3f3 solid;
border-right: 1px #f3f3f3 solid;
}
/deep/ {
.el-form.el-form--inline {
height: 28px !important;
line-height: 28px !important;
}
.el-loading-mask {
background-color: rgba(0, 0, 0, 0.3);
}
}
</style>

View File

@ -0,0 +1,154 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="modifyAdjacentStation">
<div class="adjacentStationTrip"> {{ tripNumber }}次列车</div>
<div class="adjacentStationStart">
<el-select
v-model="model.arriveStationCode"
placeholder=""
size="mini"
style="width:100px"
popper-class="stationSelect"
>
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<div style="display:inline-block">站驶来</div>
</div>
<div class="adjacentStationEnd">
<div style="display:inline-block">驶向</div>
<el-select
v-model="model.departStationCode"
placeholder=""
size="mini"
style="width:100px"
popper-class="stationSelect"
>
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<div style="display:inline-block"></div>
</div>
</div>
<el-row justify="center" class="button-group" style="margin-top:20px">
<el-col :span="8" :offset="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="1">
<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 {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'ModifyAdjacentStation',
data() {
return {
dialogShow: false,
loading: false,
tripNumber:'',
stationList:[],
model:{
stationCode:'', //
runPlanCode:'', //
arriveStationCode:'', //
departStationCode:'' //
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.modifyAdjacentStation.menu.domId : '';
},
title() {
return '修改相关车站';
}
},
mounted() {
this.stationList = this.$store.state.map.map.stationList;
},
methods: {
doShow(row) {
this.model.stationCode = row.stationCode;
this.model.runPlanCode = row.code;
this.model.arriveStationCode = (row.arriveRunPlan && row.arriveRunPlan.stationCode) || '';
this.model.departStationCode = (row.departRunPlan && row.departRunPlan.stationCode) || '';
this.tripNumber = row.tripNumber;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.loading = true;
commitOperate(menuOperate.CTC.modifyAdjacentStation, this.model, 2).then(({valid})=>{
this.loading = false;
this.$emit('clearRpRow');
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('clearRpRow');
this.doClose();
this.$emit('noticeInfo');
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$emit('clearRpRow');
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style lang="scss" scoped>
.modifyAdjacentStation{text-align: center;font-size: 14px;color: #000;}
.adjacentStationTrip{text-align: center;}
.adjacentStationStart{margin-top: 10px;}
.adjacentStationEnd{margin-top: 10px;}
</style>
<style lang="scss">
.stationSelect{
z-index:2014 !important;
}
</style>

View File

@ -0,0 +1,224 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
:title="title"
:visible.sync="show"
width="560px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="modifyTripNumber">
<!-- 修改车次号(大铁CTC) -->
<div class="modifyTripNumberT">
<div style="display:inline-block;margin-right:10px">请选择车站</div>
<el-select
v-model="stationCode"
placeholder=""
size="mini"
style="width:100px"
popper-class="stationSelect"
>
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</div>
<div class="modifyTripNumberB">
<div class="modifyTripNumberBL">
<div class="modifyTripNumberTip">原列车信息</div>
<div class="modifyTripNumberS">
<div class="modifyTripNumberName">到达车次</div>
<el-input v-model="oldArriveTripNumber" type="text" class="" size="mini" style="width: 140px;" disabled />
</div>
<div class="modifyTripNumberE">
<div class="modifyTripNumberName">出发车次</div>
<el-input v-model="oldDepartTripNumber" type="text" class="" size="mini" style="width: 140px;" disabled />
</div>
</div>
<div class="modifyTripNumberBR">
<div class="modifyTripNumberTip">新列车信息</div>
<div>
<el-form ref="form" :model="model" label-width="85px" :rules="rules">
<el-form-item label="到达车次:" prop="arriveTripNumber">
<el-input v-model="model.arriveTripNumber" style="width:140px" />
</el-form-item>
<el-form-item label="出发车次:" prop="departTripNumber">
<el-input v-model="model.departTripNumber" style="width:140px" />
</el-form-item>
</el-form>
<!-- <div class="modifyTripNumberName">到达车次</div>
<el-input v-model="model.arriveTripNumber" type="text" class="" size="mini" style="width: 95px;" />
</div>
<div class="modifyTripNumberE">
<div class="modifyTripNumberName">出发车次</div>
<el-input v-model="model.departTripNumber" type="text" class="" size="mini" style="width: 95px;" />
</div> -->
</div>
</div>
<el-checkbox-group v-model="trainTypeList" style="text-align:center;margin-top:10px">
<el-checkbox label="保留车" name="type" />
<el-checkbox label="终到车" name="type" />
</el-checkbox-group>
</div>
<el-row justify="center" style="margin-top:10px">
<el-col :span="7" :offset="5">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="7" :offset="2">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</div></el-dialog>
</template>
<script>
// import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'ModifyTripNumber',
data() {
var validateTripNumber = (rule, value, callback) => {
if (value) {
const judge = /^[a-zA-Z0-9]*[\d]$/.test(value);
if (judge) {
if (value.toString().length > 6 || value.toString().length < 2) {
callback('车次长度2-6位');
} else {
callback();
}
} else {
callback('字母+数字,最后一位数字');
}
} else {
callback('请输入车次');
}
};
return {
dialogShow: false,
loading: false,
oldArriveTripNumber:'',
oldDepartTripNumber:'',
trainTypeList:[],
stationList:[],
stationCode:'', //
runPlanCode:'', //
model:{
arriveTripNumber:'', //
departTripNumber:'' //
},
rules: {
arriveTripNumber:[
{ required: true, validator: validateTripNumber, trigger: 'blur' }
// message: ''
],
departTripNumber:[
{ required: true, validator: validateTripNumber, trigger: 'blur' }
]
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.modifyTripNumber.menu.domId : '';
},
title() {
return '设置车次';
}
},
mounted() {
this.stationList = this.$store.state.map.map.stationList;
},
methods: {
doShow(row) {
this.stationCode = row.stationCode;
this.runPlanCode = row.code;
this.oldArriveTripNumber = (row.arriveRunPlan && row.arriveRunPlan.tripNumber) || '';
this.oldDepartTripNumber = (row.departRunPlan && row.departRunPlan.tripNumber) || '';
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.model = {
arriveTripNumber:'', //
departTripNumber:'' //
};
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.loading = true;
const params = Object.assign({stationCode:this.stationCode, runPlanCode:this.runPlanCode}, this.model);
commitOperate(menuOperate.CTC.modifyTripNumber, params, 2).then(({valid})=>{
this.loading = false;
this.$emit('clearRpRow');
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('clearRpRow');
this.doClose();
this.$emit('noticeInfo');
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$emit('clearRpRow');
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style lang="scss" scoped>
.modifyTripNumber{font-size: 15px;color:#201f1e;}
.modifyTripNumberT{}
.modifyTripNumberB{margin-top:20px;color:#201f1e;}
.modifyTripNumberBL,.modifyTripNumberBR{
width: 49%;
display: inline-block;
border: 1px #999795 solid;
padding:20px 10px 10px 10px;
position: relative;
}
.modifyTripNumberTip{
position:absolute;
left:10px;
top:-10px;
background: #ece9d8;
padding: 0px 5px;
}
.modifyTripNumberS{margin-bottom:20px;height: 24px;font-size:0;}
.modifyTripNumberName{display: inline-block;width:85px;text-align: right;font-size: 15px;}
.modifyTripNumberE{margin-bottom: 20px;height: 24px;font-size:0;}
</style>
<style lang="scss">
.chengdou-03__systerm .el-dialog .modifyTripNumber .el-checkbox-group .el-checkbox .el-checkbox__label{font-size: 15px !important;line-height: 16px;}
.chengdou-03__systerm .el-dialog .modifyTripNumber .el-checkbox-group .el-checkbox .el-checkbox__input{vertical-align: top;line-height: 16px;}
.stationSelect{
z-index:2014 !important;
}
.modifyTripNumberBR .el-form-item .el-form-item__label{font-size:15px;padding-right:0px;line-height:24px;vertical-align:top;}
.modifyTripNumberBR .el-form-item{margin-bottom:20px;}
.modifyTripNumberBR .el-form-item .el-form-item__content{line-height:24px;vertical-align: top;height:24px;}
</style>

View File

@ -0,0 +1,132 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
title="作业窗口"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div>
<el-form :model="form" class="demo-form-inline">
<el-form-item label="作业任务:">
<el-input v-model="form.work" type="textarea" :rows="2" :disabled="true" />
</el-form-item>
<el-form-item label="操作时间:">
<el-input v-model="form.time" type="textarea" :rows="1" :disabled="true" />
</el-form-item>
<el-form-item label="操作信息:">
<el-input v-model="form.info" type="textarea" :rows="2" :disabled="true" />
</el-form-item>
</el-form>
<div style="text-align: center;"><el-button v-if="type === 'rec'" style="width: 200px;" @click="commit(menuOperate.CTC.receivingNotice)">完成接预</el-button></div>
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'dep'" style="width: 200px;" @click="commit(menuOperate.CTC.departureNotice)">完成发预</el-button></div>
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'rec'" style="width: 200px;" @click="commit(menuOperate.CTC.cancelReceivingNotice)">取消接预</el-button></div>
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'dep'" style="width: 200px;" @click="commit(menuOperate.CTC.cancelDepartureNotice)">取消发预</el-button></div>
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'arrive'" style="width: 200px;" @click="commit(menuOperate.CTC.finishArrive)">完成到点</el-button></div>
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'arrive'" style="width: 200px;" @click="commit(menuOperate.CTC.cancelArrive)">取消到点</el-button></div>
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'departure'" style="width: 200px;" @click="commit(menuOperate.CTC.finishDeparture)">完成发点</el-button></div>
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'departure'" style="width: 200px;" @click="commit(menuOperate.CTC.cancelDeparture)">取消发点</el-button></div>
<el-button style="height: 50px;width: 50px;position: relative;left: 370px;" @click="doClose">关闭</el-button>
</div>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import CancelMouseState from '@/mixin/CancelMouseState';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'TrainMove',
mixins: [
CancelMouseState
],
data() {
return {
selected: null,
selectedType: '',
dialogShow: false,
menuOperate: menuOperate,
type: '',
stationCode: '',
tripNumber: '',
loading: false,
tableData: [],
deviceTypeList: [
{ label: '区段', value: 'Section' },
{ label: '信号机', value: 'Signal' },
{ label: '道岔', value: 'Switch' },
{ label: '车站', value: 'Station' }
],
deviceIdList: [],
form: {
work: '',
time: '',
info: ''
}
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}
},
methods: {
doShow(row, type, stationCode) {
this.type = type;
this.loading = true;
this.stationCode = stationCode;
this.tripNumber = row.tripNumber;
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit(type) {
this.loading = true;
commitOperate(type, {stationCode: this.stationCode, tripNumber: this.tripNumber}, 3).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$message.error('操作失败!');
});
}
}
};
</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;
}
.text-button{
color: #148ad0;
cursor:pointer;
}
.text-button:active{
color: #b938e1;
text-decoration: underline;
}
.text-button:hover{
color: #b938e1;
text-decoration: underline;
}
</style>

View File

@ -0,0 +1,196 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm route-detail"
:title="title"
:visible.sync="show"
width="460px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="2"><span>车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="6" :offset="1"><span>始端信号机</span></el-col>
<el-col :span="6">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div style="margin-top: 20px">
<el-table
ref="tempTable"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
:height="140"
>
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleRouteName(scope.row.name) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleDirection(scope.row.startSignalCode) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.turnBack ? '折返': '直通' }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'RouteDetail',
components: {
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
stationName: '',
signalName: '',
domIdChoose: ''
};
},
computed: {
...mapGetters('map', [
'signalList',
'mapConfig'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
},
title() {
return '查询进路状态';
}
},
methods: {
doShow(operate, selected, tempData) {
this.selected = selected;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
handleRouteName(name) {
return name.replace(/-/, '-->');
},
handleDirection(signalCode) {
let signalDirection = '';
this.signalList.some(item => {
if (item.code === signalCode) {
signalDirection = item.right;
return true;
}
});
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
return '上行';
} else {
return '下行';
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
operation: OperationEvent.Signal.detail.menu.operation
};
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();
});
},
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>

View File

@ -0,0 +1,278 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm route-setting"
:title="title"
:visible.sync="show"
width="460px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="2"><span class="item-lable">车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
<el-col :span="6">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="route-table-box">
<span class="route-table-tip">进路列表</span>
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini" height="90" highlight-current-row @row-click="clickEvent">
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleRouteName(scope.row.name) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleDirection(scope.row.startSignalCode) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.turnBack ? '折返': '直通' }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" style="margin-top: 40px">
<el-col :span="12" :offset="12">
<el-button
:id="domIdConfirm"
type="primary"
:loading="loading"
:disabled="commitDisabled"
@click="commit"
>执行</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<!--<password-box ref="passwordBox" @checkOver="passWordCommit" />-->
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import PasswordBox from './childDialog/passwordInputBox.vue';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
export default {
name: 'RouteSelection',
components: {
NoticeInfo
// PasswordBox
},
mixins: [
CancelMouseState
],
data() {
return {
tempData: [],
beforeSectionList: [],
dialogShow: false,
loading: false,
selected: null,
operation: '',
display: true,
stationName: '',
signalName: '',
tableStyle: {
'border-bottom': 'none'
},
commitDisabled:true,
controlTypeNameMap: {
'01': '折返',
'02': '直通'
},
row: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.guide.confirm.domId : '';
},
title() {
return '办理引导进路';
},
...mapGetters('map', [
'signalList',
'mapConfig'
])
},
methods: {
getProtectedSectionName(row) {
let name = '';
if (row &&
row.overlapSectionList &&
row.overlapSectionList &&
row.overlapSectionList.length > 0) {
const protect = row.overlapSectionList[0];
name = `${protect.name}`;
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) {
name = `${name}(${station.name})`;
}
}
return name;
},
handleRouteName(name) {
return name.replace(/-/, '-->');
},
handleDirection(signalCode) {
let signalDirection = '';
this.signalList.some(item => {
if (item.code === signalCode) {
signalDirection = item.right;
return true;
}
});
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
return '上行';
} else {
return '下行';
}
},
doShow(operate, selected, tempData) {
this.selected = selected;
this.commitDisabled = true;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
clickEvent(row, event, column) {
this.commitDisabled = false;
this.row = row;
if (row) {
const operate = {
operation: OperationEvent.Signal.guide.choose.operation,
val: row.code
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
},
//
commit() {
if (this.row && this.row.code) {
const operate = {
over: true,
operation: OperationEvent.Signal.guide.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
param: {
routeCode: this.row.code
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
this.doClose();
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
}
},
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>
.route-table-tip {
position: relative !important;
color: #3C72DF !important;
background: #ECE9D8 !important;
font-size: 12px;
top: -7px;
left: 7px;
}
.route-table-box {
margin-top: 20px !important;
line-height: 10px !important;
border: 2px solid #FFFFFF !important;
border-radius: 5px !important;
z-index: 1;
padding-bottom: 40px;
}
.item-lable {
line-height: 26px !important;
font-size: 13px;
}
</style>

View File

@ -0,0 +1,267 @@
<template>
<div>
<el-dialog v-dialogDrag class="chengdou-03__systerm route-hand-control" :title="title" :visible.sync="show" width="500px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row class="header">
<el-col :span="11"><span>车站</span></el-col>
<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="table">
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" :highlight-current-row="highlight" :height="140" @row-click="clickEvent">
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleRouteName(scope.row.name) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleDirection(scope.row.startSignalCode) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.turnBack ? '折返': '直通' }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :disabled="commitDisabled" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'RouteHandControl',
components: {
ConfirmControl,
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
operation: null,
selection: [],
stationName: '',
signalName: '',
highlight: true,
row: '',
commitDisabled: true
};
},
computed: {
...mapGetters('map', [
'signalList',
'mapConfig'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return OperationEvent.Signal.humanControl.choose.domId;
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return OperationEvent.Signal.atsAutoControl.choose.domId;
}
return '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return '进路收人工控';
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return '进路交自动控';
}
return '';
}
},
methods: {
doShow(operate, selected, tempData) {
this.selected = selected;
this.selection = [];
this.commitDisabled = true;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
if (tempData && tempData.length > 0) {
tempData.forEach(elem => {
elem.check = false;
elem.disabled = false;
//
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
(elem.atsControl == '0') ) {
elem.disabled = true;
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
(elem.atsControl == '1') ) {
elem.disabled = true;
}
});
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
handleRouteName(name) {
return name.replace(/-/, '-->');
},
handleDirection(signalCode) {
let signalDirection = '';
this.signalList.some(item => {
if (item.code === signalCode) {
signalDirection = item.right;
return true;
}
});
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
return '上行';
} else {
return '下行';
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.tempTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
clickEvent(row, event, column) {
this.highlight = false;
if (row && row.code) {
this.highlight = true;
this.selection = [row];
this.beforeSectionList = row.containSectionList || [];
this.row = row;
//
const operate = {
operation: '',
val: row.code
};
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
this.commitDisabled = !row.atsControl;
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/
this.commitDisabled = Boolean(row.atsControl);
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
},
commit() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
this.humanControl();
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/
this.atsAutoControl();
}
},
//
humanControl() {
commitOperate(menuOperate.Signal.humanControl, {routeCodeList: [this.row.code]}, 2).then(({valid, operate}) => {
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
atsAutoControl() {
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList: [this.row.code]}, 2).then(({valid, operate}) => {
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
over: true,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -0,0 +1,325 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm route-setting"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="2"><span class="item-lable">车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
<el-col :span="6">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="route-table-box">
<span class="route-table-tip">进路列表</span>
<el-table
ref="table"
:data="tempData"
border
:cell-style="tableStyle"
style="width: 99%;"
size="mini"
height="150"
highlight-current-row
@row-click="clickEvent"
>
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleRouteName(scope.row.name) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleDirection(scope.row.startSignalCode) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.turnBack ? '折返': '直通' }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" style="margin-top: 70px">
<el-col :span="12" :offset="12">
<el-button
:id="domIdConfirm"
type="primary"
:loading="loading"
:disabled="commitDisabled"
@click="commit"
>执行</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<password-box ref="passwordBox" @checkOver="passWordCommit" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { deepAssign } from '@/utils/index';
import PasswordBox from './childDialog/passwordInputBox.vue';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'RouteSelection',
components: {
NoticeInfo,
PasswordBox
},
mixins: [
CancelMouseState
],
data() {
return {
tempData: [],
beforeSectionList: [],
dialogShow: false,
loading: false,
selected: null,
row: null,
operation: '',
display: true,
stationName: '',
signalName: '',
commitDisabled:true,
tableStyle: {
'border-bottom': 'none'
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.confirm.domId : '';
},
title() {
return '办理进路';
},
...mapGetters('map', [
'signalList',
'sectionList',
'mapConfig'
])
},
methods: {
getProtectedSectionName(row) {
let name = '';
if (row &&
row.overlapSectionList &&
row.overlapSectionList &&
row.overlapSectionList.length > 0) {
const protect = row.overlapSectionList[0];
name = `${protect.name}`;
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) {
name = `${name}(${station.name})`;
}
}
return name;
},
handleRouteName(name) {
return name.replace(/-/, '-->');
},
handleDirection(signalCode) {
let signalDirection = '';
this.signalList.some(item => {
if (item.code === signalCode) {
signalDirection = item.right;
return true;
}
});
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
return '上行';
} else {
return '下行';
}
},
doShow(operate, selected, tempData) {
this.selected = selected;
this.commitDisabled = true;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.restoreBeforeDevices();
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
restoreBeforeDevices() {
//
if (this.beforeSectionList && this.beforeSectionList.length) {
this.beforeSectionList.forEach(elem => {
elem.cutOff = false;
});
}
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
this.beforeSectionList = [];
},
clickEvent(row, event, column) {
this.row = row;
if (row) {
//
this.restoreBeforeDevices();
row.canSetting = true;
this.commitDisabled = false;
//
const containSectionList = [];
if (row.routeSectionList && row.routeSectionList.length) {
//
row.routeSectionList.forEach(elem => {
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
section.logicSectionCodeList.forEach(item => {
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
sec.cutOff = true;
containSectionList.push(sec);
});
} else {
section.cutOff = true;
containSectionList.push(section);
}
});
}
this.$store.dispatch('training/updateMapState', [...containSectionList]);
this.beforeSectionList = containSectionList || [];
//
const operate = {
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
val: row.code
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
},
commit() {
if (this.row && this.row.canSetting) {
this.loading = true;
commitOperate({operation:OperationEvent.Signal.arrangementRoute.confirm.operation}, {routeCode: this.row.code}, 1).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.$refs.passwordBox.doShow({operation:OperationEvent.Signal.arrangementRoute.menu.operation});
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
}
},
passWordCommit(data) {
this.loading = true;
commitOperate(menuOperate.Signal.arrangementRoute, {}, 2).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
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>
.route-table-tip {
position: relative !important;
color: #3C72DF !important;
background: #ECE9D8 !important;
font-size: 12px;
top: -7px;
left: 7px;
}
.route-table-box {
margin-top: 15px !important;
line-height: 10px !important;
border: 2px solid #FFFFFF !important;
border-radius: 5px !important;
z-index: 1;
}
.item-lable {
line-height: 26px !important;
font-size: 13px;
}
</style>

View File

@ -0,0 +1,308 @@
<template>
<el-dialog v-dialogDrag top="12vh" class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1100px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="2">列车车次</el-col>
<el-col :span="21"><span style="font-size: 18px;color: #f00;">{{ selected.tripNumber }}</span></el-col>
</el-row>
<el-row style="margin-top: 10px;">
<el-col :span="2">进路描述</el-col>
<el-col :span="21">
<div style="width: 100%;height: 50px;background: #DFE3E6;padding: 10px;">
<span>{{ `${type === 'dep' ? '发车/通过': '接车/通过'} 股道:${selected.trackName};进路按钮:${getRouteNames()}` }}</span>
</div>
</el-col>
</el-row>
<el-row style="margin-top: 10px;">
<el-col :span="2">进路显示</el-col>
<el-col :span="21">
<map-visual ref="map" :map-data="mapData" :width="960" :height="600" />
</el-col>
</el-row>
<!--<el-row :gutter="24">-->
<!--<el-col :span="6">-->
<!--<el-row class="header">-->
<!--<el-col :span="11"><span>集中站</span></el-col>-->
<!--<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>-->
<!--</el-row>-->
<!--<el-row>-->
<!--<el-col :span="11">-->
<!--<el-input v-model="stationName" size="small" disabled />-->
<!--</el-col>-->
<!--<el-col :span="11" :offset="2">-->
<!--<el-input v-model="signalName" size="small" disabled />-->
<!--</el-col>-->
<!--</el-row>-->
<!--<el-row style="margin-top: 10px; line-height: 30px;">-->
<!--<el-col :span="11"><span>进路列表</span></el-col>-->
<!--</el-row>-->
<!--<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; height: 460px; margin-top:10px" size="mini" highlight-current-row :show-header="false" @row-click="clickEvent">-->
<!--<el-table-column :id="domIdChoose" prop="name" style="margin-left:30px" />-->
<!--</el-table>-->
<!--<el-row justify="center" class="button-group">-->
<!--<el-col :span="8" :offset="4">-->
<!--<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定</el-button>-->
<!--</el-col>-->
<!--<el-col :span="8" :offset="4">-->
<!--<el-button :id="domIdCancel" @click="cancel"> </el-button>-->
<!--</el-col>-->
<!--</el-row>-->
<!--</el-col>-->
<!--<el-col :span="18">-->
<!--<map-visual ref="map" :map-data="mapData" :width="780" :height="600" />-->
<!--</el-col>-->
<!--</el-row>-->
<el-row style="margin-top: 10px;margin-bottom: 10px;">
<el-col :span="21" :offset="2">
<el-radio v-model="radio" disabled label="禁用">分段办理</el-radio>
</el-col>
</el-row>
<div style="display: flex;justify-content: space-between;margin-bottom: 10px;">
<el-button v-if="type === 'rec'" size="mini" :type="selected.receivingRouteAutoTrigger?'warning':''" :disabled="!!route.lock || !selected.receivingNotice" @click="commit">办理接车</el-button>
<el-button v-if="type === 'dep'" size="mini" :type="selected.departureRouteAutoTrigger?'warning':''" :disabled="!!route.lock || !selected.departureNotice" @click="commit">办理发车</el-button>
<el-button size="mini" disabled>办理通过</el-button>
<el-button size="mini" disabled>进路单锁</el-button>
<el-button size="mini" :disabled="cancelRouteDisabled" @click="commit">取消进路</el-button>
<el-button size="mini" @click="doClose">关闭</el-button>
</div>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<confirm-tip ref="confirmTip" @close="doClose" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { deepAssign } from '@/utils/index';
import { mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
import { mapGetters } from 'vuex';
// import { dbReadData } from '@/utils/indexedDb';
import ConfirmTip from './childDialog/confirmTip';
import MapVisual from './mapVisual';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'RouteSelection',
components: {
NoticeInfo,
ConfirmTip,
MapVisual
},
data() {
return {
radio:'',
beforeSectionList: [],
beforeSwitchList: [],
dialogShow: false,
loading: false,
selected: {},
operation: '',
display: true,
mapData: null,
route: '',
tableStyle: {
'border-bottom': 'none'
},
type: ''
};
},
computed: {
...mapGetters('map', [
'overlapData'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return '进路办理';
},
cancelRouteDisabled() {
return !this.route.lock || (this.type === 'rec' && !this.selected.receivingNotice) || (this.type === 'dep' && !this.selected.departureNotice);
}
},
watch: {
'$store.state.map.mapDataLoadedCount': function (val) { //
this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map));
}
},
methods: {
getRouteNames() {
const receivingRoute = this.$store.state.map.routeData[this.selected.receivingRouteCode];
const departureRoute = this.$store.state.map.routeData[this.selected.departureRouteCode];
return (receivingRoute ? receivingRoute.name : '') + ',' + (departureRoute ? departureRoute.name : '');
},
doShow(selected, type) {
// this.$root.$emit('dialogOpen', selected);
this.selected = selected;
this.type = type;
this.dialogShow = true;
this.$nextTick(function () {
this.loadData();
this.$store.dispatch('training/emitTipFresh');
});
},
loadData() {
this.beforeSwitchList = [];
this.beforeSectionList = [];
if (this.mapData) {
this.$refs.map.loadData(this.mapData);
setTimeout(() => {
if (this.type === 'rec') {
this.clickEvent(this.selected.receivingRouteCode);
} else if (this.type === 'dep') {
this.clickEvent(this.selected.departureRouteCode);
}
}, 100);
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.route = {};
this.restoreBeforeDevices();
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
restoreBeforeDevices() {
//
if (this.beforeSectionList && this.beforeSectionList.length) {
this.beforeSectionList.forEach(el => {
el.routeLock = false;
el.preWhite = false;
});
}
if (this.beforeSwitchList && this.beforeSwitchList.length) {
this.beforeSwitchList.forEach(el => {
// N- R- NO-() EX-
el.pos = 'NO';
el.routeLock = false;
});
}
this.$refs.map.updateMapDevice([...this.beforeSectionList, ...this.beforeSwitchList]);
this.beforeSectionList = [];
this.beforeSwitchList = [];
},
clickEvent(routeCode) {
const route = this.$store.state.map.routeData[routeCode];
this.route = route;
if (route) {
//
this.restoreBeforeDevices();
const containSectionList = [];
const containSwitchList = [];
if (!route.setting) {
const signalBegin = this.$refs.map.getDeviceByCode(route.startSignalCode);
const code = route.startSignalCode;
const signal = signalBegin;
const switchCodeList = [];
this.$refs.map.setCenterWithOffset(code, 50, signal.position.y);
if (route.routeSectionList && route.routeSectionList.length) {
route.routeSectionList.forEach(code => {
const section = deepAssign({}, this.$refs.map.getDeviceByCode(code));
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
section.logicSectionCodeList.forEach(sectionCode => {
containSectionList.push({code: sectionCode, preWhite: true});
});
} else {
containSectionList.push({code, preWhite: true});
}
if (section.switchSection && section.switch) {
switchCodeList.push(section.switch.code);
}
});
}
if (route.routeSwitchList && route.routeSwitchList.length) {
route.routeSwitchList.filter(el => switchCodeList.includes(el.switchCode)).forEach(el => {
const swch = deepAssign({}, this.$refs.map.getDeviceByCode(el.switchCode));
const sectionA = this.$refs.map.getDeviceByCode(swch.sectionACode);
// const sectionB = this.$refs.map.getDeviceByCode(swch.sectionBCode);
const sectionC = this.$refs.map.getDeviceByCode(swch.sectionCCode);
// normalPosition: el.normal, reversePosition: !el.normal
containSwitchList.push({code: el.switchCode, routeLock: true, pos:el.pos });
if (el.normal) {
containSectionList.push({code: sectionA.code, routeLock:true });
// containSectionList.push({code: sectionC.code, preBlue: true });
} else {
containSectionList.push({code: sectionC.code, routeLock:true });
// containSectionList.push({code: sectionB.code, preBlue: true });
}
});
}
this.$refs.map.updateMapDevice([...containSectionList, ...containSwitchList]);
this.beforeSectionList = containSectionList;
this.beforeSwitchList = containSwitchList;
//
const operate = {
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
val: route.code
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
} else {
this.$refs.noticeInfo.doShow('当前进路不允许排列, 与其他进路可能发生冲突');
}
}
},
commit() {
if (this.route) {
this.loading = true;
const type = this.route.lock ? menuOperate.Signal.cancelTrainRoute : menuOperate.Signal.arrangementRoute;
const param = this.route.lock ? { signalCode: this.route.startSignalCode } : { routeCode:this.route.code };
commitOperate(type, param, 3).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((e) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
}
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
} // D3D8DC
};
</script>
<style scoped>
/deep/ .el-dialog__header{
background: #B4B6B9;
}
/deep/ .el-dialog__body{
background: #D3D8DC !important;
padding: 10px;
}
</style>

View File

@ -0,0 +1,114 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm section-detail"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" label-position="left" :model="formModel" label-width="100px">
<el-form-item label="区段名称">
<el-input v-model="formModel.sectionName" disabled />
</el-form-item>
<el-form-item label="车站名称">
<el-input v-model="formModel.stationName" disabled />
</el-form-item>
<el-form-item label="公里标(Km)">
<el-input v-model="formModel.kmPost" disabled />
</el-form-item>
<el-form-item label="长度(m)">
<el-input v-model="formModel.lengthFact" disabled />
</el-form-item>
</el-form>
<el-row justify="center" style="margin-top: 50px">
<el-col :span="7" :offset="17">
<el-button :id="domIdConfirm" @click="commit">确定</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'RouteDetail',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
formModel: {
sectionName: '',
stationName: '',
kmPost: '',
lengthFact: ''
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Section.detail.menu.domId : '';
},
title() {
return '无岔区段属性对话框';
}
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
const hasParentCode = (this.selected.type == '02');
this.formModel.sectionName = hasParentCode ? selected.parentName + '-' + selected.name : selected.name;
this.formModel.lengthFact = selected.lengthFact;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.formModel.stationName = station.name;
this.formModel.kmPost = station.kmPost;
}
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
operation: OperationEvent.Section.detail.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,265 @@
<template>
<el-dialog
id="sendRunplanClass"
v-dialogDrag
class="chengdou-03__systerm"
:title="title"
:visible.sync="show"
width="1165px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="tableList">
<div class="leftTable">
<el-table
id="sendRunplanLeftTable"
:data="tableData1"
border
height="570"
style="width: 100%;border:1px #ccc solid"
>
<el-table-column
type="index"
label="序号"
width="70"
/>
<el-table-column
prop="tripNumber"
label="车次"
width="100"
/>
<el-table-column
prop="type"
label="类型"
width="50"
/>
<el-table-column
prop="arriveRunPlan.accessName"
label="方向"
width="105"
>
<template slot-scope="scope">
<div v-if="scope.row.arriveRunPlan" :title="scope.row.arriveRunPlan.accessName">{{ scope.row.arriveRunPlan.accessName }}</div>
</template>
</el-table-column>
<el-table-column
prop="arriveRunPlan.sectionName"
label="到达股道"
width="95"
/>
<el-table-column
prop="arriveRunPlan.planTime"
label="到达时刻"
width="95"
/>
<el-table-column
prop="departRunPlan.accessName"
label="去向"
width="105"
>
<template slot-scope="scope">
<div v-if="scope.row.departRunPlan" :title="scope.row.departRunPlan.accessName">{{ scope.row.departRunPlan.accessName }}</div>
</template>
</el-table-column>
<el-table-column
prop="departRunPlan.sectionName"
label="出发股道"
width="95"
/>
<el-table-column
prop="departRunPlan.planTime"
label="出发时间"
width="100"
/>
<el-table-column
prop="property"
label="属性"
width="100"
/>
<el-table-column
prop="tips"
label="注意事项"
width="120"
/>
</el-table>
</div>
<div class="rightTable">
<el-table
id="sendRunplanRightTable"
:data="tableData2"
border
height="570"
style="width: 100%;border:1px #ccc solid"
>
<el-table-column
prop="number"
label="序号"
width="40"
/>
<el-table-column
prop="number"
label="受令单位"
width="70"
/>
<el-table-column
prop="number"
label="状态"
width="70"
/>
</el-table>
</div>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="2">
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">发送</el-button>
</el-col>
</el-row>
</el-dialog>
<!-- updateTrip -->
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name:'SendRunplan',
data() {
return {
dialogShow:false,
loading: false,
tableData1:[],
tableData2:[],
addModel:{
stationCode:'',
planParamList:[],
force:1
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.batchModifyTrackSection.menu.domId : '';
},
title() {
return '发送计划';
}
},
methods:{
doShow(tableData, activeDepartRunPlan, activeArriveRunPlan, filterSectionList) {
this.addModel.planParamList = [];
this.tableData1 = [];
tableData.forEach(element => {
if (element.arriveRunPlan && element.arriveRunPlan.sectionCode) {
const sectionObj = filterSectionList.find(section=>{ return section.code == element.arriveRunPlan.sectionCode; }) || {name:''};
element.arriveRunPlan.sectionName = sectionObj.name;
}
if (element.departRunPlan && element.departRunPlan.sectionCode) {
const sectionObj = filterSectionList.find(section=>{ return section.code == element.departRunPlan.sectionCode; }) || {name:''};
element.departRunPlan.sectionName = sectionObj.name;
}
this.tableData1.push(element);
});
// filterSectionList
this.addModel.stationCode = this.$store.state.training.roleDeviceCode;
const activeDepartRunPlanList = Object.values(activeDepartRunPlan).filter(activeDepart=>{ return activeDepart.changeSectionCode && activeDepart.changeSectionCode != activeDepart.sectionCode; });
if (activeDepartRunPlanList.length > 0) {
activeDepartRunPlanList.forEach(depart=>{
this.addModel.planParamList.push({
runPlanCode:depart.code,
departSectionCode:depart.changeSectionCode
});
});
}
const activeArriveRunPlanList = Object.values(activeArriveRunPlan).filter(activeArrive=>{ return activeArrive.changeSectionCode && activeArrive.changeSectionCode != activeArrive.sectionCode; });
if (activeArriveRunPlanList.length > 0) {
activeArriveRunPlanList.forEach(arrive=>{
this.addModel.planParamList.push({
runPlanCode:arrive.code,
arriveSectionCode:arrive.changeSectionCode
});
});
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.addModel.planParamList.length > 0) {
const params = this.addModel;
this.loading = true;
commitOperate(menuOperate.CTC.batchModifyTrackSection, params, 3).then(({valid})=>{
this.loading = false;
if (valid) {
this.$emit('closeFlash');
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$emit('noticeInfo');
});
}
// * @param stationCode
// * @param runPlanCode
// * @param arriveSectionCode
// * @param departSectionCode
// * @param force 0:1
},
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 lang="scss" scoped>
.tableList{
display: inline-block
}
.leftTable{
display: inline-block;
width: 955px;
}
.rightTable{
display: inline-block;
margin-left:10px;
font-size:13px;
width:150px
}
.sendRunplanLeftTable{
}
</style>
<style lang="css">
#sendRunplanClass.chengdou-03__systerm .el-dialog .el-dialog__body{
padding: 10px;
}
#sendRunplanClass.chengdou-03__systerm .el-dialog .el-table .cell div{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

View File

@ -0,0 +1,62 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm"
title="调车进路参数"
:visible.sync="show"
width="300px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px;text-align: center;">
<div>{{ `${routeName}调车进路预计占用时间:` }}</div>
<div style="display: flex;align-items: center;margin-top: 10px;">
<el-input-number v-model="time" size="small" :controls="false" style="width: 220px;" />
<div>分钟</div>
</div>
<div style="border: 1px solid #000;padding: 10px;margin-top: 10px;">
<el-radio v-model="radio" label="1">电力机车</el-radio>
<el-radio v-model="radio" label="2">内燃机车</el-radio>
</div>
<div style="text-align: center;margin-top: 10px;">
<el-button @click="commit">确定</el-button>
<el-button @click="doClose">取消</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
export default {
name: 'ShuntRoute',
data() {
return {
show: false,
routeName: '',
radio: '',
time: 0
};
},
methods: {
doClose() {
this.show = false;
this.$emit('routeCancel');
},
doShow(route) {
this.show = true;
this.routeName = route.name;
},
commit() {
this.show = false;
this.$emit('routeCommit', '', this.time);
}
}
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,191 @@
<template>
<el-dialog
id="stageRunplanClass"
v-dialogDrag
class="chengdou-03__systerm"
:title="title"
:visible.sync="show"
width="945px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div>
<span>最近接受时间: {{ updateTime }}</span>
</div>
<el-table
id="stageRunplanLeftTable"
:data="tableData"
border
height="370"
style="width: 100%;border:1px #ccc solid"
>
<el-table-column
type="index"
label="序号"
width="70"
/>
<el-table-column
prop="arriveTripNumber"
label="到达车次"
width="100"
/>
<el-table-column
prop="departTripNumber"
label="出发车次"
width="100"
/>
<el-table-column
prop="status"
label="类型"
width="100"
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<div v-else-if="scope.row.status==1">添加</div>
<div v-else-if="scope.row.status==0">变化</div>
</template>
</el-table-column>
<el-table-column
prop="arriveSectionCode"
label="到达股道"
width="100"
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<div v-else-if="scope.row.status==1">{{ sectionMap[scope.row.arriveSectionCode] }}</div>
<div v-else-if="scope.row.arriveSectionCode">{{ sectionMap[scope.row.arriveSectionCode]+'['+sectionMap[scope.row.oldArriveSectionCode]+']' }}</div>
</template>
</el-table-column>
<el-table-column
prop="arrivePlanTime"
label="到达时间"
width="170"
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<div v-else>{{ scope.row.arrivePlanTime }}</div>
</template>
</el-table-column>
<el-table-column
prop="departSectionCode"
label="出发股道"
width="100"
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<!-- {{ sectionMap }} -->
<div v-else-if="scope.row.status==1">{{ sectionMap[scope.row.departSectionCode] }}</div>
<div v-else-if="scope.row.departSectionCode">{{ sectionMap[scope.row.departSectionCode]+'['+sectionMap[scope.row.oldDepartSectionCode]+']' }}</div>
</template>
</el-table-column>
<el-table-column
prop="departPlanTime"
label="出发时间"
width="170"
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<div v-else>{{ scope.row.departPlanTime }}</div>
</template>
</el-table-column>
</el-table>
<el-row justify="center" class="button-group" style="margin-top:10px">
<el-col :span="6" :offset="5">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">签收</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name:'StageRunplan',
data() {
return {
dialogShow:false,
loading: false,
tableData:[],
sectionMap:{},
updateTime:''
};
},
computed: {
...mapGetters('map', [
'sectionList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.stationSignRunplan.menu.domId : '';
},
title() {
return '阶段计划';
}
},
methods:{
doShow(currentRailwaySimulationRunplan) {
this.stationCode = currentRailwaySimulationRunplan.stationCode;
this.tableData = currentRailwaySimulationRunplan.dataList;
this.updateTime = currentRailwaySimulationRunplan.updateTime;
this.sectionMap = {};
this.sectionList.forEach(section=>{
if (section.standTrack) { this.sectionMap[section.code] = section.name; }
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.loading = true;
commitOperate(menuOperate.CTC.stationSignRunplan, {stationCode:this.stationCode}, 3).then(({valid})=>{
this.loading = false;
if (valid) {
this.$emit('closeFlash');
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$emit('noticeInfo');
});
},
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 lang="css">
#stageRunplanClass.chengdou-03__systerm .el-dialog .el-dialog__body{
padding: 10px;
}
#stageRunplanClass.chengdou-03__systerm .el-dialog .el-table .cell div{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

View File

@ -0,0 +1,603 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-detain-train"
:title="title"
:visible.sync="show"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="11">
<span>车站</span>
<el-input v-model="stationName" style="width: 110px; margin-left: 10px;" size="small" disabled />
</el-col>
<el-col :span="11" :offset="1">
<span>站台</span>
<el-input v-model="standName" style="width: 110px; margin-left: 10px;" size="small" disabled />
</el-col>
</el-row>
<div v-if="DetainTrain">
<div
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;"
>
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
<el-row style="margin-top: -13px;">
<el-radio-group v-model="radio" @change="choose">
<el-col :span="24">
<el-radio
:id="domIdDetainCar"
label="01"
style="display: block; text-align: left; float: left; margin-right: 10px;"
>本站台
</el-radio>
<el-radio
v-if="radio1 == 2"
:id="isUpDirection? domIdDetainChoose: ''"
:disabled="!isUpDirection"
:label="`${isUpDirection}`"
style="display: block; text-align: left; float: left; margin-right: 10px;"
>上行全线
</el-radio>
<el-radio
v-if="radio1 == 2"
:id="isUpDirection ? '': domIdDetainChoose"
:label="`${!isUpDirection}`"
:disabled="isUpDirection"
style="display: block; text-align: left; float: left;"
>下行全线</el-radio>
</el-col>
</el-radio-group>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio1"
label="1"
:disabled="radio1 == '2'"
style="display: block; text-align: left;"
>
扣车</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio1"
label="2"
:disabled="radio1 == '1'"
style="display: block; text-align: left;"
>
取消扣车</el-radio>
</el-col>
</el-row>
</div>
</div>
<div v-if="JumpStop">
<div
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 115px;"
>
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
<el-row style="margin-top: -13px;">
<el-col :span="24">
<el-radio-group v-model="radio" @change="chooseJumpStop">
<el-radio
:id="radio == '02' ? domIdChoose : ''"
label="01"
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 80px;"
>
站台跳停
</el-radio>
<el-radio
:id="radio == '01' ? domIdChoose : ''"
label="02"
style="display: block; text-align: left; margin-left: 0; float: left;"
>
指定列车跳停</el-radio>
<div style="float: left;">
<span>车组号</span>
<el-select
:id="domIdCancelJumpStop"
v-model="tripNumber"
style="width: 120px; margin-left: 20px;"
size="mini"
:disabled="radio == '01'"
@change="trainNoSelectChange"
>
<el-option
v-for="option in trainList"
:key="option.groupNumber"
:label="option.groupNumber"
:value="option.groupNumber"
/>
</el-select>
</div>
</el-radio-group>
</el-col>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio1"
label="1"
:disabled="radio1 == 2"
style="display: block; text-align: left;"
>
跳停</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio1"
label="2"
:disabled="radio1 == 1"
style="display: block; text-align: left;"
>
取消跳停</el-radio>
</el-col>
</el-row>
</div>
</div>
<div v-if="RunLevel">
<div
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 105px;"
>
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
<el-row style="margin-top: -13px;">
<el-radio-group v-model="radio" @change="chooseStopTime">
<el-col :span="24">
<el-radio
:id="radio == '02' ? domIdChoose1 : ''"
label="01"
style="display: block; text-align: left; margin-right: 10px; margin-bottom:10px; width: 60px;"
>
自动
</el-radio>
<el-radio
:id="radio == '01' ? domIdChoose1 : ''"
label="02"
style="display: block; text-align: left; margin-left: 0; float: left;"
>
人工</el-radio>
<div v-if="radio2 == 2" style="float: left; margin-left: 20px;">
<span>运行等级</span>
<el-select
:id="domIdRunLevel"
v-model="trainRunlevel"
style="width: 120px; margin-left: 20px;"
size="mini"
:disabled="radio == '01'"
@change="trainNoSelectLevel"
>
<el-option
v-for="option in runLevelList"
:key="option.value"
:label="option.label"
:value="option.value"
/>
</el-select>
</div>
<div v-if="radio2 == 1" style="float: left; margin-left: 20px;">
<span>停站时间</span>
<el-input-number
:id="domIdStopTime"
v-model="trainStopTime"
:min="15"
:max="300"
:step="1"
size="mini"
:controls="false"
style="width:100px;display:inline-block;margin-left:10px;height:34px;"
:disabled="radio == '01'"
@blur="handleTrainStopTime"
/>
<div style="margin-left: 5px;display: inline-block;font-size: 14px;"></div>
</div>
</el-col>
</el-radio-group>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
<el-radio :id="effective === false? '': domIdChoose2" :label="false">一次有效</el-radio>
<el-radio :id="effective === true? '': domIdChoose2" :label="true">一直有效</el-radio>
</el-radio-group>
<!-- <el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
<el-col :span="11">
<el-radio
:id="effective == '02' ? '': domIdChoose2"
label="01"
style="display: block; text-align: left;"
>
一次有效</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
:id="effective == '01' ? '': domIdChoose2"
label="02"
style="display: block; text-align: left;"
>
一直有效</el-radio>
</el-col>
</el-radio-group> -->
</el-row>
</div>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'StandDetainTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
isUpDirection:true,
radio: '01',
radio1: '1',
radio2: '1',
DetainTrain: false,
JumpStop: false,
RunLevel: false,
trainList: [],
runLevelList: [
{ value: 2, label: '常速' },
{ value: 1, label: '低速' },
{ value: 3, label: '高速' }
],
tripNumber: '',
effective: '01',
trainRunlevel: 2,
trainStopTime: 30,
disabledTime: true
};
},
computed: {
...mapGetters('map', [
'map',
'mapConfig'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
domIdDetainCar() {
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrain.choose.domId : '';
},
domIdDetainChoose() {
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
},
domIdChoose() {
if (this.radio1 == '1') { //
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
} else { //
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
}
},
// domIdJumpStop() {
// return this.dialogShow ? OperationEvent.StationStand.setJumpStop.choose.domId : '';
// },
domIdCancelJumpStop() {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.choose.domId : '';
},
domIdChoose1() {
if (this.radio2 == '1') { //
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose1.domId : '';
} else { //
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose1.domId : '';
}
},
domIdChoose2() {
if (this.radio2 == '1') { //
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
} else { //
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose2.domId : '';
}
},
domIdStopTime() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.input.domId : '';
},
domIdRunLevel() {
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.chooseTrain.domId : '';
},
title() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
return '扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation || this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
return '取消扣车';
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
return '设置跳停';
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
return '取消跳停';
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
return '设置停站时间';
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
return '设置站间运行等级';
}
return '';
}
},
watch: {
operation(data) {
if (data != OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
this.JumpStop = false;
this.RunLevel = false;
this.DetainTrain = false;
this.radio = '01';
this.radio1 = '1';
this.radio2 = '1';
if (data == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.radio1 = '1';
this.radio = '01';
this.DetainTrain = true;
} else if (data == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
this.radio1 = '2';
this.radio = '01';
this.DetainTrain = true;
} else if (data == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.JumpStop = true;
this.radio1 = '1';
} else if (data == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
this.JumpStop = true;
this.radio1 = '2';
} else if (data == OperationEvent.StationStand.setStopTime.menu.operation) {
this.RunLevel = true;
this.radio2 = '1';
} else if (data == OperationEvent.StationStand.setRunLevel.menu.operation) {
this.RunLevel = true;
this.radio2 = '2';
}
}
}
},
methods: {
doShow(operate, selected, tempDate = null) {
this.selected = selected;
if (!this.dialogShow) {
this.tripNumber = '';
this.standName = '';
this.stationName = '';
this.operation = operate.operation;
if (selected) {
this.getDirection(selected);
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.getDirection(selected);
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.radio = selected.direction;
}
this.effective = false;
this.radio = '01';
this.disabledTime = true;
this.trainList = this.map.trainList; //
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
getDirection(selected) {
if (this.mapConfig.upRight) {
this.standName = selected.right ? '上行' : '下行';
this.isUpDirection = selected.right;
} else if (!this.mapConfig.upRight) {
this.standName = selected.right ? '下行' : '上行';
this.isUpDirection = !selected.right;
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.operation = '';
this.trainStopTime = 30;
},
choose(upDown) { // code
const operate = {
operation: upDown == '01'
? OperationEvent.StationStand.cancelDetainTrain.choose.operation
: OperationEvent.Command.common.choose.operation,
val: this.radio
};
if (this.radio == '02' || this.radio == '03') {
this.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation;
} else {
this.operation = OperationEvent.StationStand.cancelDetainTrain.menu.operation;
}
this.handleBreak(operate);
},
trainNoSelectChange(upDown) { //
const operate = {
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation
};
this.handleBreak(operate);
},
chooseJumpStop(upDown) {
const operate = {
operation: ''
};
if (this.radio1 == '1') { //
operate.operation = OperationEvent.StationStand.setJumpStop.select.operation;
} else { //
operate.operation = OperationEvent.StationStand.cancelJumpStop.select.operation;
}
this.handleBreak(operate);
},
chooseEffective(effective) {
const operate = {
operation: '',
val: effective
};
if (this.radio2 == '1') { //
operate.operation = OperationEvent.StationStand.setStopTime.choose2.operation;
} else { //
operate.operation = OperationEvent.StationStand.setRunLevel.choose2.operation;
}
this.handleBreak(operate);
},
chooseStopTime(upDown) {
const operate = {
operation: '',
val: this.radio
};
if (this.radio2 == '1') { //
operate.operation = OperationEvent.StationStand.setStopTime.choose1.operation;
} else { //
operate.operation = OperationEvent.StationStand.setRunLevel.choose1.operation;
}
if (this.radio === '01') {
this.disabledTime = true;
this.trainRunlevel = 2;
this.effective = false;
} else {
this.disabledTime = false;
this.effective = true;
}
this.handleBreak(operate);
},
trainNoSelectLevel(upDown) {
const operate = {
operation: OperationEvent.StationStand.setRunLevel.chooseTrain.operation,
val: `${upDown}`,
param: {
standRunLevel: `${upDown}`
}
};
this.handleBreak(operate);
},
handleTrainStopTime() {
const operate = {
operation: OperationEvent.StationStand.setStopTime.input.operation,
val: `${this.trainStopTime}`
};
this.handleBreak(operate);
},
handleBreak(operate) { //
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
valid && this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
});
},
commit() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.setDetainTrain(); /** 设置扣车*/
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation || this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
this.cancelDetainTrain(); /** 取消扣车*/
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.setJumpStop(); /** 设置跳停*/
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
this.cancelJumpStop(); /** 取消跳停*/
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
this.setStopTime(); /** 设置停站时间*/
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
this.setRunLevel(); /** 设置站间运行等级*/
}
},
//
setDetainTrain() {
this.sendCommand(menuOperate.StationStand.setDetainTrain);
},
//
cancelDetainTrain() {
if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
} else {
this.sendCommand(menuOperate.StationStand.cancelDetainTrainAll);
}
},
//
setJumpStop() {
this.sendCommand(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.tripNumber});
},
//
cancelJumpStop() {
this.sendCommand(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.tripNumber});
},
//
setStopTime() {
this.sendCommand(menuOperate.StationStand.setStopTime, {parkingTime: this.radio == '01' ? -1 : this.trainStopTime, parkingAlwaysValid: this.effective});
},
//
setRunLevel() {
this.sendCommand(menuOperate.StationStand.setRunLevel, {runLevelTime:this.radio === '02' ? this.trainRunlevel : 2, runLevelTimeForever: this.effective});
},
sendCommand(operate, param) {
this.loading = true;
commitOperate(operate, param, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style lang="scss" scoped>
.stand-detain-train .context {
height: 80px !important;
}
/deep/ {
.el-input--mini .el-input__icon{
line-height: 100%;
}
}
</style>

View File

@ -0,0 +1,217 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-detail"
:title="title"
:visible.sync="show"
width="380px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10">
<span>车站</span>
</el-col>
<el-col :span="10" :offset="2">
<span>站台</span>
</el-col>
</el-row>
<el-row class="header">
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="standName" style="padding: 0 3px;" size="small" disabled />
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>停站时间</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.stopTime" size="small" disabled />
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>运行等级</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.runLevel" size="small" disabled />
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>扣车</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.detainCar" size="small" disabled />
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>跳停</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.jumpStop" size="small" disabled />
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="18">
<span style="opacity: 0;">1</span>
</el-col>
<el-col :span="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'StandDetail',
components: {
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
stationName: '',
standName: '',
runLevelList: [
'自动',
'低速',
'常速',
'高速'
],
modelData: {
stopTime: '自动',
runLevel: '自动',
detainCar: '无扣车',
jumpStop: '无跳停'
}
};
},
computed: {
...mapGetters('map', [
'mapConfig',
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return '站台信息';
}
},
methods: {
loadInitData(selected, opts) {
this.tempData = [];
// const stationList = this.stationList.slice();
// const index = this.stationList.findIndex(n => n.code == selected.stationCode);
// let stationStand, station;
// if (selected.direction == '01') { //
// //
// if (index != 0) {
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
// }
// } else {
// //
// if (index != this.stationList.length - 1) {
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
// }
// }
this.modelData = {
stopTime: selected.parkingTime < 0 ? '自动' : `${selected.parkingTime}`,
runLevel: this.runLevelList[selected.runLevelTime],
detainCar: selected.stationHoldTrain || selected.centerHoldTrain ? '已设置' : '无扣车',
jumpStop: selected.allSkip || selected.assignSkip ? '已设置' : '无跳停'
};
},
doShow(operate, selected, opts) {
this.selected = selected;
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
if (this.mapConfig.upRight) {
this.standName = selected.right ? '上行' : '下行';
} else if (!this.mapConfig.upRight) {
this.standName = selected.right ? '下行' : '上行';
}
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.loadInitData(selected, opts);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
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>
.content {
margin-top: 20px;
}
</style>

View File

@ -0,0 +1,332 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-control"
: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="80px" :model="addModel" :rules="rules" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item v-if="operation != '70c'" prop="sectionCode">
<span slot="label">轨道</span>
<el-input v-model="addModel.sectionCode" />
</el-form-item>
<el-form-item v-else prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车组号:" prop="groupNumber">
<el-select v-model="addModel.groupNumber" filterable>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item v-if="operation == '708'" prop="serviceNumber">
<span slot="label">服务号</span>
<el-input v-model="addModel.serviceNumber" />
</el-form-item>
<el-form-item v-else-if="operation == '70c'" prop="targetCode">
<span slot="label">目的地</span>
<el-input v-model="addModel.targetCode" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item v-if="operation == '708'" prop="trainCode">
<span slot="label">序列号</span>
<el-input v-model="addModel.trainCode" />
</el-form-item>
<el-form-item v-else-if="operation == '70c'" prop="serviceNumber">
<span slot="label">服务号</span>
<el-input v-model="addModel.serviceNumber" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item v-if="operation == '70c'" prop="trainType">
<span slot="label">运行模式</span>
<br>
<el-radio-group v-model="addModel.runningMode" style="margin-left: 15px;">
<el-radio :label="'01'">普通</el-radio>
<el-radio :label="'02'">专列</el-radio>
<el-radio :label="'03'">不停站直达</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</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>
<confirm-train ref="confirmTrain" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import ConfirmTrain from './childDialog/confirmTrain';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'TrainControl',
components: {
ConfirmTrain,
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
trainList: [],
selected: null,
addModel: {
stationName: '',
sectionCode: '',
trainWindowCode: '',
groupNumber: '',
serviceNumber: '',
targetCode: '',
trainCode: '',
runningMode: ''
},
rules: {
stationName: [
{ required: true, message: '请输入车站', trigger: 'blur'}
],
sectionCode: [
{ required: true, message: '请输入轨道', trigger: 'blur'}
],
trainWindowCode: [
{ required: true, message: '请输入车次窗', trigger: 'blur'}
],
groupNumber: [
{ required: true, message: '请选择车组号', trigger: 'change' }
],
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'blur'}
],
targetCode: [
{ required: true, message: '请输入目的地号', trigger: 'blur'}
],
trainCode: [
{ required: true, message: '请输入序列号', trigger: 'blur'}
],
runningMode: [
{ required: true, message: '请选择运行模式', trigger: 'blur'}
]
},
operation: null,
dialogShow: false,
loading: false,
direction: 0
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
/* 设目的地*/
return OperationEvent.Train.destinationTrainId.menu.domId;
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation) {
/* 设计划车*/
return OperationEvent.Train.setPlanTrainId.menu.domId;
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation) {
/* 设人工车*/
return OperationEvent.Train.artificialTrainId.menu.domId;
}
return '';
}
return '';
},
title() {
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
return '设目的地车';
} else if ( this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
return '设计划车';
} else if ( this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
return '设人工车';
}
return '';
}
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.operation = operate.operation;
}
this.addModel = {
tripNumber: '',
groupNumber: '',
trainType: '01',
serviceNumber: '',
targetCode: ''
};
/** 加载列车数据*/
this.loadInitData(this.map);
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() {
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation ) {
this.destinationTrainId();
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
this.setPlanTrainId();
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
this.artificialTrainId();
}
},
//
destinationTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
operation: OperationEvent.Train.destinationTrainId.menu.operation,
message: [`设目的地车:成功`],
val: ''
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
//
setPlanTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
message: [`设计划车:成功`],
val: ''
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
//
artificialTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
operation: OperationEvent.Train.artificialTrainId.menu.operation,
message: [`设人工车:成功`],
val: ''
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} 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>
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -0,0 +1,133 @@
<template>
<el-dialog v-dialogDrag class="chengdou-03__systerm route-create" :title="title" :visible.sync="show" width="380px" label-position="top" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<el-form size="small" label-width="100px">
<el-form-item label="列车:" prop="trainCode">
<el-select v-model="trainCode" filterable placeholder="列车">
<el-option
v-for="item in trainList"
:key="item.code"
:label="item.groupNumber"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="列车方向:" prop="direction">
<el-select v-model="direction" filterable placeholder="列车方向">
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
</el-select>
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数下行路线车次号选择基数)</div> -->
</el-form-item>
</el-form>
<el-row>
<el-col style="text-align: right;">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</div>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteCreate',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
trainList: [],
trainNoList: [],
directionList: [
{
value: '2',
label: '上行'
},
{
value: '1',
label: '下行'
}
],
trainCode: '',
tripNumber: '',
direction: '',
selected: null
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return OperationEvent.Section.newtrain.menu.domId;
},
title() {
return '设置列车';
}
},
methods: {
doShow(operate, selected) {
this.dialogShow = true;
this.selected = selected;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.trainCode = '';
this.direction = '';
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
send: true,
operation: OperationEvent.Section.newtrain.menu.operation,
cmdType: CMD.Section.CMD_NEW_TRAIN,
val: '' + this.direction + '::' + this.trainCode
};
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();
});
},
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>

View File

@ -0,0 +1,181 @@
<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="80px" :model="addModel" :rules="rules" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-select v-model="addModel.groupNumber" filterable>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</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';
export default {
name: 'TrainCreateNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName:'',
trainWindowCode: '',
groupNumber:''
},
rules: {
groupNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur'}
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
},
title() {
return '新建车组号';
}
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName:'',
trainWindowCode: '',
groupNumber:''
};
}
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 = {
send: true,
operation: OperationEvent.Train.createTrainNo.menu.operation
};
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();
});
} 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: 400px;
overflow: auto;
}
</style>

View File

@ -0,0 +1,150 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="90px" :model="addModel" :rules="rules">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-input v-model="addModel.groupNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import { getPublishMapTrainNos } from '@/api/runplan';
import CancelMouseState from '@/mixin/CancelMouseState';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'TrainDelete',
components: {
ConfirmControl,
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
selected: null,
addModel: {
groupNumber: ''
},
rules: {
groupNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
},
title() {
return '删除列车识别号';
}
},
methods: {
loadInitData(map) {
if (map) {
// getPublishMapTrainNos(map.skinCode).then(response => {
// this.trainNoList = response.data;
// }).catch(() => {
// this.$messageBox(``);
// });
}
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
// mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.delTrainId.menu.operation
};
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();
});
} 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>

View File

@ -0,0 +1,176 @@
<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="80px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-select v-model="addModel.groupNumber" filterable disabled>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</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';
export default {
name: 'TrainDeleteNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName:'',
trainWindowCode: '',
groupNumber:''
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
},
title() {
return '删除车组号';
}
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName:'',
trainWindowCode: '',
groupNumber:''
};
}
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 = {
send: true,
operation: OperationEvent.Train.deleteTrainNo.menu.operation
};
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();
});
} 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: 400px;
overflow: auto;
}
</style>

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