Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
0f56e5b7eb
@ -194,6 +194,7 @@ class SkinCode extends defaultStyle {
|
|||||||
},
|
},
|
||||||
safetyDoor: { // 屏蔽门
|
safetyDoor: { // 屏蔽门
|
||||||
height: 3, // 站台屏蔽门高度
|
height: 3, // 站台屏蔽门高度
|
||||||
|
width: 60,
|
||||||
distance: 8, // 站台和屏蔽门之间的距离
|
distance: 8, // 站台和屏蔽门之间的距离
|
||||||
defaultColor: '#00FF00', // 屏蔽门默认颜色
|
defaultColor: '#00FF00', // 屏蔽门默认颜色
|
||||||
splitDoorColor: '#F61107' // 屏蔽门切除颜色
|
splitDoorColor: '#F61107' // 屏蔽门切除颜色
|
||||||
|
@ -6,119 +6,110 @@ const deviceRender = {};
|
|||||||
deviceRender[deviceType.Section] = {
|
deviceRender[deviceType.Section] = {
|
||||||
_type: deviceType.Section,
|
_type: deviceType.Section,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 2
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Signal渲染配置*/
|
/** Signal渲染配置*/
|
||||||
deviceRender[deviceType.Signal] = {
|
deviceRender[deviceType.Signal] = {
|
||||||
_type: deviceType.Signal,
|
_type: deviceType.Signal,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 3
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Switch渲染配置*/
|
/** Switch渲染配置*/
|
||||||
deviceRender[deviceType.Switch] = {
|
deviceRender[deviceType.Switch] = {
|
||||||
_type: deviceType.Switch,
|
_type: deviceType.Switch,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 5
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Station渲染配置*/
|
/** Station渲染配置*/
|
||||||
deviceRender[deviceType.Station] = {
|
deviceRender[deviceType.Station] = {
|
||||||
_type: deviceType.Station,
|
_type: deviceType.Station,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 4
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** StationStand渲染配置*/
|
/** StationStand渲染配置*/
|
||||||
deviceRender[deviceType.StationStand] = {
|
deviceRender[deviceType.StationStand] = {
|
||||||
_type: deviceType.StationStand,
|
_type: deviceType.StationStand,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 5
|
};
|
||||||
|
|
||||||
|
/** Psd渲染配置*/
|
||||||
|
deviceRender[deviceType.Psd] = {
|
||||||
|
_type: deviceType.Psd,
|
||||||
|
zlevel: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
/** StationControl渲染配置*/
|
/** StationControl渲染配置*/
|
||||||
deviceRender[deviceType.StationControl] = {
|
deviceRender[deviceType.StationControl] = {
|
||||||
_type: deviceType.StationControl,
|
_type: deviceType.StationControl,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 4
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** ImageControl渲染配置*/
|
/** ImageControl渲染配置*/
|
||||||
deviceRender[deviceType.ImageControl] = {
|
deviceRender[deviceType.ImageControl] = {
|
||||||
_type: deviceType.ImageControl,
|
_type: deviceType.ImageControl,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 5
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** ZcControl渲染配置*/
|
/** ZcControl渲染配置*/
|
||||||
deviceRender[deviceType.ZcControl] = {
|
deviceRender[deviceType.ZcControl] = {
|
||||||
_type: deviceType.ZcControl,
|
_type: deviceType.ZcControl,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 6
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** LcControl渲染配置*/
|
/** LcControl渲染配置*/
|
||||||
deviceRender[deviceType.LcControl] = {
|
deviceRender[deviceType.LcControl] = {
|
||||||
_type: deviceType.LcControl,
|
_type: deviceType.LcControl,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 6
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** LimitControl渲染配置*/
|
/** LimitControl渲染配置*/
|
||||||
deviceRender[deviceType.LimitControl] = {
|
deviceRender[deviceType.LimitControl] = {
|
||||||
_type: deviceType.LimitControl,
|
_type: deviceType.LimitControl,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 5
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** StationDelayUnlock渲染配置*/
|
/** StationDelayUnlock渲染配置*/
|
||||||
deviceRender[deviceType.StationDelayUnlock] = {
|
deviceRender[deviceType.StationDelayUnlock] = {
|
||||||
_type: deviceType.StationDelayUnlock,
|
_type: deviceType.StationDelayUnlock,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 6
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Train渲染配置*/
|
/** Train渲染配置*/
|
||||||
deviceRender[deviceType.Train] = {
|
deviceRender[deviceType.Train] = {
|
||||||
_type: deviceType.Train,
|
_type: deviceType.Train,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 9
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** TrainWindow渲染配置*/
|
/** TrainWindow渲染配置*/
|
||||||
deviceRender[deviceType.TrainWindow] = {
|
deviceRender[deviceType.TrainWindow] = {
|
||||||
_type: deviceType.TrainWindow,
|
_type: deviceType.TrainWindow,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 8
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Line渲染配置*/
|
/** Line渲染配置*/
|
||||||
deviceRender[deviceType.Line] = {
|
deviceRender[deviceType.Line] = {
|
||||||
_type: deviceType.Line,
|
_type: deviceType.Line,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 7
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Text渲染配置*/
|
/** Text渲染配置*/
|
||||||
deviceRender[deviceType.Text] = {
|
deviceRender[deviceType.Text] = {
|
||||||
_type: deviceType.Text,
|
_type: deviceType.Text,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 7
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** TrainWindow渲染配置*/
|
/** TrainWindow渲染配置*/
|
||||||
deviceRender[deviceType.TrainWindow] = {
|
deviceRender[deviceType.TrainWindow] = {
|
||||||
_type: deviceType.TrainWindow,
|
_type: deviceType.TrainWindow,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 4
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Train渲染配置*/
|
/** Train渲染配置*/
|
||||||
deviceRender[deviceType.TRain] = {
|
deviceRender[deviceType.TRain] = {
|
||||||
_type: deviceType.TRain,
|
_type: deviceType.TRain,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
// progressive: 4
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** CheckBox渲染配置*/
|
/** CheckBox渲染配置*/
|
||||||
deviceRender[deviceType.CheckBox] = {
|
deviceRender[deviceType.CheckBox] = {
|
||||||
_type: deviceType.CheckBox,
|
_type: deviceType.CheckBox,
|
||||||
|
@ -4,331 +4,338 @@ const deviceState = {};
|
|||||||
|
|
||||||
deviceState[deviceType.Section] = {
|
deviceState[deviceType.Section] = {
|
||||||
/** 区段状态*/
|
/** 区段状态*/
|
||||||
status: {
|
status: {
|
||||||
Default: '01', /** 空闲(缺省值)*/
|
Default: '01', /** 空闲(缺省值)*/
|
||||||
State00: '00', /** 未定义状态 */
|
State00: '00', /** 未定义状态 */
|
||||||
State01: '01', /** 空闲 */
|
State01: '01', /** 空闲 */
|
||||||
State02: '02', /** 通信车占用 */
|
State02: '02', /** 通信车占用 */
|
||||||
State03: '03', /** 非通信车占用 */
|
State03: '03', /** 非通信车占用 */
|
||||||
State04: '04', /** 进路锁闭 */
|
State04: '04', /** 进路锁闭 */
|
||||||
State05: '05', /** 故障锁闭 */
|
State05: '05', /** 故障锁闭 */
|
||||||
State06: '06', /** 封锁 */
|
State06: '06', /** 封锁 */
|
||||||
State07: '07', /** ATC切除 */
|
State07: '07', /** ATC切除 */
|
||||||
State08: '08', /** ATS切除 */
|
State08: '08', /** ATS切除 */
|
||||||
State09: '09', /** 进路延续保护 */
|
State09: '09', /** 进路延续保护 */
|
||||||
State10: '10', /** 延时释放 */
|
State10: '10', /** 延时释放 */
|
||||||
State11: '11', /** 保护区段锁闭 */
|
State11: '11', /** 保护区段锁闭 */
|
||||||
State12: '12', /** 保护区段延时解锁 */
|
State12: '12', /** 保护区段延时解锁 */
|
||||||
State13: '13', /** ARB出清检测错误状态 */
|
State13: '13', /** ARB出清检测错误状态 */
|
||||||
State14: '14' /** 计轴失效 */
|
State14: '14' /** 计轴失效 */
|
||||||
},
|
},
|
||||||
/** 限速*/
|
/** 限速*/
|
||||||
speedUpperLimit: {
|
speedUpperLimit: {
|
||||||
Default: -1 /** 不限速*/
|
Default: -1 /** 不限速*/
|
||||||
},
|
},
|
||||||
/** 是否切除*/
|
/** 是否切除*/
|
||||||
cutOff: {
|
cutOff: {
|
||||||
Default: false /** 是否切除*/
|
Default: false /** 是否切除*/
|
||||||
},
|
},
|
||||||
/** 是否故障*/
|
/** 是否故障*/
|
||||||
fault: {
|
fault: {
|
||||||
Default: false /** 非故障*/
|
Default: false /** 非故障*/
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
deviceState[deviceType.Switch] = {
|
deviceState[deviceType.Switch] = {
|
||||||
/** 定位状态*/
|
/** 定位状态*/
|
||||||
locateType: {
|
locateType: {
|
||||||
Default: '01', /** 道岔位置类型 - 定位(缺省值)*/
|
Default: '01', /** 道岔位置类型 - 定位(缺省值)*/
|
||||||
State01: '01', /** 道岔位置类型 - 定位 */
|
State01: '01', /** 道岔位置类型 - 定位 */
|
||||||
State02: '02', /** 道岔位置类型 - 反位 */
|
State02: '02', /** 道岔位置类型 - 反位 */
|
||||||
State03: '03', /** 道岔位置类型 - 失去表示 */
|
State03: '03', /** 道岔位置类型 - 失去表示 */
|
||||||
State04: '04' /** 道岔位置类型 - 挤岔 */
|
State04: '04' /** 道岔位置类型 - 挤岔 */
|
||||||
},
|
},
|
||||||
/** 道岔状态*/
|
/** 道岔状态*/
|
||||||
status: {
|
status: {
|
||||||
Default: '01', /** 道岔状态类型 - 空闲(缺省值)*/
|
Default: '01', /** 道岔状态类型 - 空闲(缺省值)*/
|
||||||
State01: '01', /** 道岔状态类型 - 空闲 */
|
State01: '01', /** 道岔状态类型 - 空闲 */
|
||||||
State02: '02', /** 道岔状态类型 - 通信车占用 */
|
State02: '02', /** 道岔状态类型 - 通信车占用 */
|
||||||
State03: '03', /** 道岔状态类型 - 非通信车占用 */
|
State03: '03', /** 道岔状态类型 - 非通信车占用 */
|
||||||
State04: '04', /** 道岔状态类型 - 进路锁闭 */
|
State04: '04', /** 道岔状态类型 - 进路锁闭 */
|
||||||
State05: '05', /** 道岔状态类型 - 故障锁闭 */
|
State05: '05', /** 道岔状态类型 - 故障锁闭 */
|
||||||
State06: '06', /** 道岔状态类型 - 进路延续保护 */
|
State06: '06', /** 道岔状态类型 - 进路延续保护 */
|
||||||
State07: '07', /** 道岔状态类型 - 进路延续保护解锁 */
|
State07: '07', /** 道岔状态类型 - 进路延续保护解锁 */
|
||||||
State08: '08', /** 道岔状态类型 - ATC切除 */
|
State08: '08', /** 道岔状态类型 - ATC切除 */
|
||||||
State09: '09', /** 道岔状态类型 - ATS切除 */
|
State09: '09', /** 道岔状态类型 - ATS切除 */
|
||||||
State10: '10', /** 道岔状态类型 - 人工单锁 */
|
State10: '10', /** 道岔状态类型 - 人工单锁 */
|
||||||
State11: '11', /** 道岔状态类型 - 逻辑锁 */
|
State11: '11', /** 道岔状态类型 - 逻辑锁 */
|
||||||
State12: '12', /** 道岔状态类型 - 人工锁+逻辑锁 */
|
State12: '12', /** 道岔状态类型 - 人工锁+逻辑锁 */
|
||||||
State13: '13', /** 道岔状态类型 - 延时释放*/
|
State13: '13', /** 道岔状态类型 - 延时释放*/
|
||||||
State14: '14' /** 道岔状态类型 - 封锁*/
|
State14: '14' /** 道岔状态类型 - 封锁*/
|
||||||
},
|
},
|
||||||
/** 是否故障*/
|
/** 是否故障*/
|
||||||
fault: {
|
fault: {
|
||||||
Default: false /** 非故障*/
|
Default: false /** 非故障*/
|
||||||
},
|
},
|
||||||
/** 是否切除*/
|
/** 是否切除*/
|
||||||
cutOff: {
|
cutOff: {
|
||||||
Default: false /** 是否切除*/
|
Default: false /** 是否切除*/
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
deviceState[deviceType.Signal] = {
|
deviceState[deviceType.Signal] = {
|
||||||
/** 进路性质类型 */
|
/** 进路性质类型 */
|
||||||
natureType: {
|
natureType: {
|
||||||
Default: '00', /** 无状态(缺省值)*/
|
Default: '00', /** 无状态(缺省值)*/
|
||||||
State01: '01', /** 列车进路 */
|
State01: '01', /** 列车进路 */
|
||||||
State02: '02', /** 调车进路 */
|
State02: '02', /** 调车进路 */
|
||||||
State03: '03' /** 折返进路 */
|
State03: '03' /** 折返进路 */
|
||||||
},
|
},
|
||||||
/** 信号机状态类型 */
|
/** 信号机状态类型 */
|
||||||
status: {
|
status: {
|
||||||
Default: '01', /** 关闭(缺省值)*/
|
Default: '01', /** 关闭(缺省值)*/
|
||||||
State01: '01', /** 关闭 */
|
State01: '01', /** 关闭 */
|
||||||
State02: '02', /** 开放正向 */
|
State02: '02', /** 开放正向 */
|
||||||
State03: '03', /** 开放侧向 */
|
State03: '03', /** 开放侧向 */
|
||||||
State04: '04', /** 引导 */
|
State04: '04', /** 引导 */
|
||||||
State05: '05', /** 封锁 */
|
State05: '05', /** 封锁 */
|
||||||
State06: '06', /** 故障 */
|
State06: '06', /** 故障 */
|
||||||
State07: '07', /** 功能封锁 */
|
State07: '07', /** 功能封锁 */
|
||||||
State08: '08' /** 信号保护区段监视 */
|
State08: '08' /** 信号保护区段监视 */
|
||||||
},
|
},
|
||||||
/** 信号机状态类型 */
|
/** 信号机状态类型 */
|
||||||
lightType: {
|
lightType: {
|
||||||
Default: '01', /** 物理点灯(缺省值)*/
|
Default: '01', /** 物理点灯(缺省值)*/
|
||||||
State01: '01', /** 物理点灯 */
|
State01: '01', /** 物理点灯 */
|
||||||
State02: '02' /** 逻辑点灯 */
|
State02: '02' /** 逻辑点灯 */
|
||||||
},
|
},
|
||||||
/** 信号机延时状态类型 */
|
/** 信号机延时状态类型 */
|
||||||
delayType: {
|
delayType: {
|
||||||
Default: '01', /** 未延时解锁(缺省值)*/
|
Default: '01', /** 未延时解锁(缺省值)*/
|
||||||
State01: '01', /** 未延时解锁 */
|
State01: '01', /** 未延时解锁 */
|
||||||
State02: '02', /** 人工闭塞延时解锁 */
|
State02: '02', /** 人工闭塞延时解锁 */
|
||||||
State03: '03' /** 自动闭塞延时解锁 */
|
State03: '03' /** 自动闭塞延时解锁 */
|
||||||
},
|
},
|
||||||
/** 信号机自动信号状态类型 */
|
/** 信号机自动信号状态类型 */
|
||||||
autoType: {
|
autoType: {
|
||||||
Default: '01', /** 隐藏(缺省值)*/
|
Default: '01', /** 隐藏(缺省值)*/
|
||||||
State01: '01', /** 隐藏 */
|
State01: '01', /** 隐藏 */
|
||||||
State02: '02', /** 设置自动信号模式状态类型 */
|
State02: '02', /** 设置自动信号模式状态类型 */
|
||||||
State03: '03', /** 设置自动进路模式状态类型 */
|
State03: '03', /** 设置自动进路模式状态类型 */
|
||||||
State04: '04' /** 信号机进路自动触发模式状态类型 */
|
State04: '04' /** 信号机进路自动触发模式状态类型 */
|
||||||
},
|
},
|
||||||
/** 信号机自动通过信号状态类型 */
|
/** 信号机自动通过信号状态类型 */
|
||||||
autoRouteType: {
|
autoRouteType: {
|
||||||
Default: '01', /** 不自动通过(缺省值)*/
|
Default: '01', /** 不自动通过(缺省值)*/
|
||||||
State01: '01', /** 不自动通过 */
|
State01: '01', /** 不自动通过 */
|
||||||
State02: '02' /** 自动通过 */
|
State02: '02' /** 自动通过 */
|
||||||
},
|
},
|
||||||
/** 信号机按钮状态类型 */
|
/** 信号机按钮状态类型 */
|
||||||
buttonState: {
|
buttonState: {
|
||||||
Default: '01', /** 空闲(缺省值)*/
|
Default: '01', /** 空闲(缺省值)*/
|
||||||
State01: '01', /** 空闲 */
|
State01: '01', /** 空闲 */
|
||||||
State02: '02', /** 选择基本进路始端 */
|
State02: '02', /** 选择基本进路始端 */
|
||||||
State03: '03', /** 选择折返进路始端 */
|
State03: '03', /** 选择折返进路始端 */
|
||||||
State04: '04', /** 基本进路终端待选 */
|
State04: '04', /** 基本进路终端待选 */
|
||||||
State05: '05' /** 折返进路终端待选 */
|
State05: '05' /** 折返进路终端待选 */
|
||||||
},
|
},
|
||||||
/** 引导信号按钮状态类型 */
|
/** 引导信号按钮状态类型 */
|
||||||
guideStatus: {
|
guideStatus: {
|
||||||
Default: '01', /** 空闲(缺省值)*/
|
Default: '01', /** 空闲(缺省值)*/
|
||||||
State01: '01', /** 空闲 */
|
State01: '01', /** 空闲 */
|
||||||
State02: '02' /** 引导 */
|
State02: '02' /** 引导 */
|
||||||
|
|
||||||
},
|
},
|
||||||
/** 道岔定位状态*/
|
/** 道岔定位状态*/
|
||||||
switchLocateType: {
|
switchLocateType: {
|
||||||
Default: '01', /** 定位(缺省值)*/
|
Default: '01', /** 定位(缺省值)*/
|
||||||
State01: '01', /** 定位*/
|
State01: '01', /** 定位*/
|
||||||
State02: '02' /** 反位*/
|
State02: '02' /** 反位*/
|
||||||
},
|
},
|
||||||
/** 信号机进路办理*/
|
/** 信号机进路办理*/
|
||||||
routeSetting: {
|
routeSetting: {
|
||||||
Default: false /** 信号机进路办理*/
|
Default: false /** 信号机进路办理*/
|
||||||
},
|
},
|
||||||
/** 是否故障*/
|
/** 是否故障*/
|
||||||
fault: {
|
fault: {
|
||||||
Default: false /** 非故障*/
|
Default: false /** 非故障*/
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
deviceState[deviceType.Station] = {
|
deviceState[deviceType.Station] = {
|
||||||
/** 是否故障*/
|
/** 是否故障*/
|
||||||
fault: {
|
fault: {
|
||||||
Default: false /** 非故障*/
|
Default: false /** 非故障*/
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
deviceState[deviceType.StationControl] = {
|
deviceState[deviceType.StationControl] = {
|
||||||
/** 控制模式状态 */
|
/** 控制模式状态 */
|
||||||
status: {
|
status: {
|
||||||
Default: '01', /** 中控(缺省值)*/
|
Default: '01', /** 中控(缺省值)*/
|
||||||
State01: '01', /** 中控 */
|
State01: '01', /** 中控 */
|
||||||
State02: '02', /** 站控 */
|
State02: '02', /** 站控 */
|
||||||
State03: '03' /** 紧急站控 */
|
State03: '03' /** 紧急站控 */
|
||||||
},
|
},
|
||||||
/** 是否故障*/
|
/** 是否故障*/
|
||||||
fault: {
|
fault: {
|
||||||
Default: false /** 非故障*/
|
Default: false /** 非故障*/
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
deviceState[deviceType.Psd] = {
|
||||||
|
/** 是否故障*/
|
||||||
|
fault: {
|
||||||
|
Default: false /** 非故障*/
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
deviceState[deviceType.StationDelayUnlock] = {
|
deviceState[deviceType.StationDelayUnlock] = {
|
||||||
/** 延迟解锁状态*/
|
/** 延迟解锁状态*/
|
||||||
status: {
|
status: {
|
||||||
Default: '01', /** 关闭(默认值)*/
|
Default: '01', /** 关闭(默认值)*/
|
||||||
State01: '01', /** 关闭 */
|
State01: '01', /** 关闭 */
|
||||||
State02: '02' /** 显示 */
|
State02: '02' /** 显示 */
|
||||||
|
|
||||||
},
|
},
|
||||||
/** 是否故障*/
|
/** 是否故障*/
|
||||||
fault: {
|
fault: {
|
||||||
Default: false /** 非故障*/
|
Default: false /** 非故障*/
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
deviceState[deviceType.StationStand] = {
|
deviceState[deviceType.StationStand] = {
|
||||||
/** 车站状态*/
|
/** 车站状态*/
|
||||||
status: {
|
status: {
|
||||||
Default: '01', /** 空闲(缺省值)*/
|
Default: '01', /** 空闲(缺省值)*/
|
||||||
State01: '01', /** 空闲 */
|
State01: '01', /** 空闲 */
|
||||||
State02: '02', /** 列车停站 */
|
State02: '02', /** 列车停站 */
|
||||||
State05: '03' /** 站台紧急关闭 */
|
State05: '03' /** 站台紧急关闭 */
|
||||||
},
|
},
|
||||||
/** 屏蔽门状态*/
|
/** 屏蔽门状态*/
|
||||||
screenDoorStatus: {
|
screenDoorStatus: {
|
||||||
Default: '01', /** 关门(缺省值)*/
|
Default: '01', /** 关门(缺省值)*/
|
||||||
State01: '01', /** 正常 */
|
State01: '01', /** 正常 */
|
||||||
State02: '02', /** 故障 */
|
State02: '02', /** 故障 */
|
||||||
State03: '03' /** 切除 */
|
State03: '03' /** 切除 */
|
||||||
},
|
},
|
||||||
/** 屏蔽门开门状态*/
|
/** 屏蔽门开门状态*/
|
||||||
screenDoorOpenStatus: {
|
screenDoorOpenStatus: {
|
||||||
Default: '01', /** 关门(缺省值)*/
|
Default: '01', /** 关门(缺省值)*/
|
||||||
State01: '01', /** 关门 */
|
State01: '01', /** 关门 */
|
||||||
State02: '02' /** 开门 */
|
State02: '02' /** 开门 */
|
||||||
},
|
},
|
||||||
/** 扣车状态*/
|
/** 扣车状态*/
|
||||||
holdStatus: {
|
holdStatus: {
|
||||||
Default: '01', /** 未设置扣车(缺省值)*/
|
Default: '01', /** 未设置扣车(缺省值)*/
|
||||||
State01: '01', /** 未设置扣车*/
|
State01: '01', /** 未设置扣车*/
|
||||||
State02: '02', /** 车站扣车*/
|
State02: '02', /** 车站扣车*/
|
||||||
State03: '03', /** 中心扣车*/
|
State03: '03', /** 中心扣车*/
|
||||||
State04: '04' /** 中心+车站扣车*/
|
State04: '04' /** 中心+车站扣车*/
|
||||||
},
|
},
|
||||||
/** 跳停*/
|
/** 跳停*/
|
||||||
jumpStopStatus: {
|
jumpStopStatus: {
|
||||||
Default: '01', /** 未设置跳停(缺省值)*/
|
Default: '01', /** 未设置跳停(缺省值)*/
|
||||||
State01: '01', /** 未设置跳停 */
|
State01: '01', /** 未设置跳停 */
|
||||||
State02: '02', /** 指定列车跳停 */
|
State02: '02', /** 指定列车跳停 */
|
||||||
State03: '03' /** 全部跳停 */
|
State03: '03' /** 全部跳停 */
|
||||||
},
|
},
|
||||||
/** 停站时间*/
|
/** 停站时间*/
|
||||||
parkingTime: {
|
parkingTime: {
|
||||||
Default: -1 /** 无停站时间*/
|
Default: -1 /** 无停站时间*/
|
||||||
},
|
},
|
||||||
/** 运行等级*/
|
/** 运行等级*/
|
||||||
intervalRunTime: {
|
intervalRunTime: {
|
||||||
Default: -1 /** 无运行等级*/
|
Default: -1 /** 无运行等级*/
|
||||||
},
|
},
|
||||||
/** 折返策略*/
|
/** 折返策略*/
|
||||||
reentryStrategy: {
|
reentryStrategy: {
|
||||||
Default: '01', /** 默认(缺省值)*/
|
Default: '01', /** 默认(缺省值)*/
|
||||||
State01: '01', /** 无折返策略 */
|
State01: '01', /** 无折返策略 */
|
||||||
State02: '02', /** 无人折返 */
|
State02: '02', /** 无人折返 */
|
||||||
State03: '03', /** 自动换端 */
|
State03: '03', /** 自动换端 */
|
||||||
State04: '04' /** 默认 */
|
State04: '04' /** 默认 */
|
||||||
},
|
},
|
||||||
/** 是否故障*/
|
/** 是否故障*/
|
||||||
fault: {
|
fault: {
|
||||||
Default: false /** 非故障*/
|
Default: false /** 非故障*/
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
deviceState[deviceType.Train] = {
|
deviceState[deviceType.Train] = {
|
||||||
/** 列车类型*/
|
/** 列车类型*/
|
||||||
type: {
|
type: {
|
||||||
Default: '01', /** 计划车-指运行图编制出的有车组号、表号、车次号的列车(缺省值)*/
|
Default: '01', /** 计划车-指运行图编制出的有车组号、表号、车次号的列车(缺省值)*/
|
||||||
State01: '01', /** 计划车-指运行图编制出的有车组号、表号、车次号的列车*/
|
State01: '01', /** 计划车-指运行图编制出的有车组号、表号、车次号的列车*/
|
||||||
State02: '02', /** 头码车-指赋予了车组号和运行目的地的非计划列车*/
|
State02: '02', /** 头码车-指赋予了车组号和运行目的地的非计划列车*/
|
||||||
State03: '03' /** 人工车-指由调度员手工添加的并人工组织运行的只赋予车组号的非计划列车*/
|
State03: '03' /** 人工车-指由调度员手工添加的并人工组织运行的只赋予车组号的非计划列车*/
|
||||||
},
|
},
|
||||||
/** 服务号状态类型*/
|
/** 服务号状态类型*/
|
||||||
serverNoType: {
|
serverNoType: {
|
||||||
Default: '01', /** 显示服务号,白色(缺省值)*/
|
Default: '01', /** 显示服务号,白色(缺省值)*/
|
||||||
State01: '01', /** 显示服务号,白色 */
|
State01: '01', /** 显示服务号,白色 */
|
||||||
State02: '02', /** 显示车组号(计划车、头码车),黄色 */
|
State02: '02', /** 显示车组号(计划车、头码车),黄色 */
|
||||||
State03: '03' /** 显示车组号(人工车),粉色 */
|
State03: '03' /** 显示车组号(人工车),粉色 */
|
||||||
},
|
},
|
||||||
/** 目的地状态类型*/
|
/** 目的地状态类型*/
|
||||||
destinationStatus: {
|
destinationStatus: {
|
||||||
Default: '01', /** 准点(缺省值)*/
|
Default: '01', /** 准点(缺省值)*/
|
||||||
State01: '01', /** 准点*/
|
State01: '01', /** 准点*/
|
||||||
State02: '02', /** 早点*/
|
State02: '02', /** 早点*/
|
||||||
State03: '03', /** 严重早点*/
|
State03: '03', /** 严重早点*/
|
||||||
State04: '04', /** 晚点*/
|
State04: '04', /** 晚点*/
|
||||||
State05: '05', /** 严重晚点*/
|
State05: '05', /** 严重晚点*/
|
||||||
State06: '06', /** 头码车*/
|
State06: '06', /** 头码车*/
|
||||||
State07: '07' /** ATP切除*/
|
State07: '07' /** ATP切除*/
|
||||||
},
|
},
|
||||||
/** 运行方向状态类型*/
|
/** 运行方向状态类型*/
|
||||||
directionType: {
|
directionType: {
|
||||||
Default: '01', /** 未知方向(缺省值)*/
|
Default: '01', /** 未知方向(缺省值)*/
|
||||||
State01: '01', /** 未知方向 */
|
State01: '01', /** 未知方向 */
|
||||||
State02: '02', /** 从左向右 */
|
State02: '02', /** 从左向右 */
|
||||||
State03: '03' /** 从右向左 */
|
State03: '03' /** 从右向左 */
|
||||||
},
|
},
|
||||||
/** 运行状态*/
|
/** 运行状态*/
|
||||||
runStatus: {
|
runStatus: {
|
||||||
Default: '01', /** 停止(缺省值)*/
|
Default: '01', /** 停止(缺省值)*/
|
||||||
State01: '01', /** 停止 */
|
State01: '01', /** 停止 */
|
||||||
State02: '02' /** 运行 */
|
State02: '02' /** 运行 */
|
||||||
},
|
},
|
||||||
/** 运行模式*/
|
/** 运行模式*/
|
||||||
runMode: {
|
runMode: {
|
||||||
Default: '01', /** 未知模式(缺省值)*/
|
Default: '01', /** 未知模式(缺省值)*/
|
||||||
State01: '01', /** 未知模式 */
|
State01: '01', /** 未知模式 */
|
||||||
State02: '02', /** ATO自动驾驶模式 AM */
|
State02: '02', /** ATO自动驾驶模式 AM */
|
||||||
State03: '03', /** ATP监控下的人工驾驶模式 CM */
|
State03: '03', /** ATP监控下的人工驾驶模式 CM */
|
||||||
State04: '04', /** 限制人工驾驶模式 RM */
|
State04: '04', /** 限制人工驾驶模式 RM */
|
||||||
State05: '05' /** 非限制人工驾驶模式 RM */
|
State05: '05' /** 非限制人工驾驶模式 RM */
|
||||||
},
|
},
|
||||||
/** 运行控制状态类型*/
|
/** 运行控制状态类型*/
|
||||||
runControlStatus: {
|
runControlStatus: {
|
||||||
Default: '01', /** 正常(缺省值)*/
|
Default: '01', /** 正常(缺省值)*/
|
||||||
State01: '01', /** 正常 */
|
State01: '01', /** 正常 */
|
||||||
State02: '02', /** 扣车 */
|
State02: '02', /** 扣车 */
|
||||||
State03: '03' /** 跳停 */
|
State03: '03' /** 跳停 */
|
||||||
},
|
},
|
||||||
/** 车门状态 */
|
/** 车门状态 */
|
||||||
doorStatus: {
|
doorStatus: {
|
||||||
Default: '01', /** 关门(缺省值)*/
|
Default: '01', /** 关门(缺省值)*/
|
||||||
State01: '01', /** 关门 */
|
State01: '01', /** 关门 */
|
||||||
State02: '02', /** 开门 */
|
State02: '02', /** 开门 */
|
||||||
State03: '03' /** 故障 */
|
State03: '03' /** 故障 */
|
||||||
},
|
},
|
||||||
/** 通信状态类型*/
|
/** 通信状态类型*/
|
||||||
communicationStatus: {
|
communicationStatus: {
|
||||||
Default: '01', /** 正常(缺省值)*/
|
Default: '01', /** 正常(缺省值)*/
|
||||||
State01: '01', /** 正常 */
|
State01: '01', /** 正常 */
|
||||||
State02: '02' /** 故障 */
|
State02: '02' /** 故障 */
|
||||||
},
|
},
|
||||||
/** 计划冲突状态*/
|
/** 计划冲突状态*/
|
||||||
planConflictStatus: {
|
planConflictStatus: {
|
||||||
Default: '01', /** 无冲突(缺省值)*/
|
Default: '01', /** 无冲突(缺省值)*/
|
||||||
State01: '01', /** 无冲突 */
|
State01: '01', /** 无冲突 */
|
||||||
State02: '02' /** 有冲突 */
|
State02: '02' /** 有冲突 */
|
||||||
},
|
},
|
||||||
/** 报警状态*/
|
/** 报警状态*/
|
||||||
alarmStatus: {
|
alarmStatus: {
|
||||||
Default: '01', /** 无报警(缺省值)*/
|
Default: '01', /** 无报警(缺省值)*/
|
||||||
State01: '01', /** 无报警 */
|
State01: '01', /** 无报警 */
|
||||||
State02: '02' /** 有报警 */
|
State02: '02' /** 有报警 */
|
||||||
},
|
},
|
||||||
/** 是否故障*/
|
/** 是否故障*/
|
||||||
fault: {
|
fault: {
|
||||||
Default: false /** 非故障*/
|
Default: false /** 非故障*/
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default deviceState;
|
export default deviceState;
|
||||||
|
@ -8,6 +8,8 @@ const deviceType = {
|
|||||||
ImageControl: 'ImageControl',
|
ImageControl: 'ImageControl',
|
||||||
Station: 'Station',
|
Station: 'Station',
|
||||||
StationStand: 'StationStand',
|
StationStand: 'StationStand',
|
||||||
|
Esp: 'Esp',
|
||||||
|
Psd: 'Psd',
|
||||||
StationControl: 'StationControl',
|
StationControl: 'StationControl',
|
||||||
StationCounter: 'StationCounter',
|
StationCounter: 'StationCounter',
|
||||||
StationDelayUnlock: 'StationDelayUnlock',
|
StationDelayUnlock: 'StationDelayUnlock',
|
||||||
|
@ -2,53 +2,53 @@ import Line from 'zrender/src/graphic/shape/Line';
|
|||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group';
|
||||||
|
|
||||||
export default class Line2 extends Group {
|
export default class Line2 extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, style) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
this.zlevel = model.zlevel;
|
this.zlevel = model.zlevel;
|
||||||
this.z = 0;
|
this.z = 0;
|
||||||
this.model = model;
|
this.model = model;
|
||||||
this.style = style;
|
this.style = style;
|
||||||
this.create();
|
this.create();
|
||||||
this.setState(model);
|
this.setState(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
const style = this.style;
|
const style = this.style;
|
||||||
if (model && model.points.length > 1) {
|
if (model && model.points.length > 1) {
|
||||||
for (let i = 0; i < (model.points.length - 1); i++) {
|
for (let i = 0; i < (model.points.length - 1); i++) {
|
||||||
this.add(new Line({
|
this.add(new Line({
|
||||||
zlevel: model.zlevel,
|
zlevel: model.zlevel,
|
||||||
z: model.isLogic ? this.z : this.z + 1,
|
z: model.isLogic ? this.z : this.z + 1,
|
||||||
shape: {
|
shape: {
|
||||||
x1: model.points[i].x,
|
x1: model.points[i].x,
|
||||||
y1: model.points[i].y,
|
y1: model.points[i].y,
|
||||||
x2: model.points[i + 1].x,
|
x2: model.points[i + 1].x,
|
||||||
y2: model.points[i + 1].y
|
y2: model.points[i + 1].y
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
lineWidth: model.width,
|
lineWidth: model.width,
|
||||||
stroke: style.Line.lineColor
|
stroke: style.Line.lineColor
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setLineType(type) {
|
setLineType(type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case '01': break;
|
case '01': break;
|
||||||
case '02':
|
case '02':
|
||||||
this.eachChild((child) => {
|
this.eachChild((child) => {
|
||||||
child.setStyle('lineDash', [4]);
|
child.setStyle('lineDash', [4]);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.setLineType(model.type);
|
this.setLineType(model.type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
80
src/jmapNew/shape/Psd/ESafeDoor.js
Normal file
80
src/jmapNew/shape/Psd/ESafeDoor.js
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||||
|
|
||||||
|
class ESafeDoor extends Group {
|
||||||
|
constructor(model) {
|
||||||
|
super();
|
||||||
|
this.model = model;
|
||||||
|
this.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
create() {
|
||||||
|
const model = this.model;
|
||||||
|
const style = this.model.style;
|
||||||
|
const padding = 0.1;
|
||||||
|
|
||||||
|
this.safeL = new Rect({
|
||||||
|
zlevel: model.zlevel,
|
||||||
|
z: model.z,
|
||||||
|
shape: {
|
||||||
|
x: model.x - model.width / 2 - padding,
|
||||||
|
y: model.y,
|
||||||
|
width: model.width / 4 + padding,
|
||||||
|
height: model.height
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: 0,
|
||||||
|
stroke: style.StationStand.safetyDoor.defaultColor,
|
||||||
|
fill: style.StationStand.safetyDoor.defaultColor
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.safeC = new Rect({
|
||||||
|
zlevel: model.zlevel,
|
||||||
|
z: model.z,
|
||||||
|
shape: {
|
||||||
|
x: model.x - model.width / 4 - padding,
|
||||||
|
y: model.y,
|
||||||
|
width: model.width / 2 + padding * 2,
|
||||||
|
height: model.height
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: 0,
|
||||||
|
stroke: style.StationStand.safetyDoor.defaultColor,
|
||||||
|
fill: style.StationStand.safetyDoor.defaultColor
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.safeR = new Rect({
|
||||||
|
zlevel: model.zlevel,
|
||||||
|
z: model.z,
|
||||||
|
shape: {
|
||||||
|
x: model.x + model.width / 4,
|
||||||
|
y: model.y,
|
||||||
|
width: model.width / 4 + padding,
|
||||||
|
height: model.height
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: 0,
|
||||||
|
stroke: style.StationStand.safetyDoor.defaultColor,
|
||||||
|
fill: style.StationStand.safetyDoor.defaultColor
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.add(this.safeL);
|
||||||
|
this.add(this.safeC);
|
||||||
|
this.add(this.safeR);
|
||||||
|
}
|
||||||
|
|
||||||
|
hasDoor(show) {
|
||||||
|
show ? this.safeC.hide() : this.safeC.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
setColor(color) {
|
||||||
|
this.safeL.setStyle('fill', color);
|
||||||
|
this.safeC.setStyle('fill', color);
|
||||||
|
this.safeR.setStyle('fill', color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ESafeDoor;
|
37
src/jmapNew/shape/Psd/index.js
Normal file
37
src/jmapNew/shape/Psd/index.js
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import ESafeDoor from './ESafeDoor';
|
||||||
|
|
||||||
|
export default class Line2 extends Group {
|
||||||
|
constructor(model, style) {
|
||||||
|
super();
|
||||||
|
this._code = model.code;
|
||||||
|
this._type = model._type;
|
||||||
|
this.zlevel = model.zlevel;
|
||||||
|
this.z = 1;
|
||||||
|
this.model = model;
|
||||||
|
this.style = style;
|
||||||
|
this.create();
|
||||||
|
this.setState(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
create() {
|
||||||
|
/** 屏蔽门*/
|
||||||
|
const model = this.model;
|
||||||
|
const style = this.style;
|
||||||
|
this.safeDoor = new ESafeDoor({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
style: style,
|
||||||
|
x: model.position.x,
|
||||||
|
y: model.position.y,
|
||||||
|
width: model.width || style.StationStand.safetyDoor.width,
|
||||||
|
height: model.height || style.StationStand.safetyDoor.height,
|
||||||
|
show: model.hasDoor
|
||||||
|
});
|
||||||
|
this.add(this.safeDoor);
|
||||||
|
}
|
||||||
|
|
||||||
|
setState(model) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -1,80 +0,0 @@
|
|||||||
import Group from 'zrender/src/container/Group';
|
|
||||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
|
||||||
|
|
||||||
class ESafeDoor extends Group {
|
|
||||||
constructor(model) {
|
|
||||||
super();
|
|
||||||
this.model = model;
|
|
||||||
this.create();
|
|
||||||
}
|
|
||||||
|
|
||||||
create() {
|
|
||||||
const model = this.model;
|
|
||||||
const style = this.model.style;
|
|
||||||
const padding = 0.1;
|
|
||||||
|
|
||||||
this.safeL = new Rect({
|
|
||||||
zlevel: model.zlevel,
|
|
||||||
z: model.z,
|
|
||||||
shape: {
|
|
||||||
x: model.x - model.width / 2 - padding,
|
|
||||||
y: model.y,
|
|
||||||
width: model.width / 4 + padding,
|
|
||||||
height: model.height
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
lineWidth: 0,
|
|
||||||
stroke: style.StationStand.safetyDoor.defaultColor,
|
|
||||||
fill: style.StationStand.safetyDoor.defaultColor
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.safeC = new Rect({
|
|
||||||
zlevel: model.zlevel,
|
|
||||||
z: model.z,
|
|
||||||
shape: {
|
|
||||||
x: model.x - model.width / 4 - padding,
|
|
||||||
y: model.y,
|
|
||||||
width: model.width / 2 + padding * 2,
|
|
||||||
height: model.height
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
lineWidth: 0,
|
|
||||||
stroke: style.StationStand.safetyDoor.defaultColor,
|
|
||||||
fill: style.StationStand.safetyDoor.defaultColor
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.safeR = new Rect({
|
|
||||||
zlevel: model.zlevel,
|
|
||||||
z: model.z,
|
|
||||||
shape: {
|
|
||||||
x: model.x + model.width / 4,
|
|
||||||
y: model.y,
|
|
||||||
width: model.width / 4 + padding,
|
|
||||||
height: model.height
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
lineWidth: 0,
|
|
||||||
stroke: style.StationStand.safetyDoor.defaultColor,
|
|
||||||
fill: style.StationStand.safetyDoor.defaultColor
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.add(this.safeL);
|
|
||||||
this.add(this.safeC);
|
|
||||||
this.add(this.safeR);
|
|
||||||
}
|
|
||||||
|
|
||||||
hasDoor(show) {
|
|
||||||
show ? this.safeC.hide() : this.safeC.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
setColor(color) {
|
|
||||||
this.safeL.setStyle('fill', color);
|
|
||||||
this.safeC.setStyle('fill', color);
|
|
||||||
this.safeR.setStyle('fill', color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default ESafeDoor;
|
|
@ -4,7 +4,6 @@ import ETime from './ETime';
|
|||||||
import ELevel from './ELevel';
|
import ELevel from './ELevel';
|
||||||
import EReentry from './EReentry';
|
import EReentry from './EReentry';
|
||||||
import EDetain from './EDetain';
|
import EDetain from './EDetain';
|
||||||
import ESafeDoor from './ESafeDoor';
|
|
||||||
import ESafeStand from './ESafeStand';
|
import ESafeStand from './ESafeStand';
|
||||||
import ESafeEmergent from './ESafeEmergent';
|
import ESafeEmergent from './ESafeEmergent';
|
||||||
import EMouse from './EMouse';
|
import EMouse from './EMouse';
|
||||||
@ -30,7 +29,8 @@ class StationStand extends Group {
|
|||||||
create() {
|
create() {
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
const style = this.style;
|
const style = this.style;
|
||||||
const drict = model.doorLocationType == '01' ? 1 : -1;
|
// const drict = model.doorLocationType == '01' ? 1 : -1;
|
||||||
|
const drict = 1;
|
||||||
|
|
||||||
/** 列车站台*/
|
/** 列车站台*/
|
||||||
const standH = drict > 0 ? style.StationStand.safetyDoor.height : model.height;
|
const standH = drict > 0 ? style.StationStand.safetyDoor.height : model.height;
|
||||||
@ -48,17 +48,17 @@ class StationStand extends Group {
|
|||||||
this.add(this.safeStand);
|
this.add(this.safeStand);
|
||||||
|
|
||||||
if (model.direction != '03') {
|
if (model.direction != '03') {
|
||||||
/** 屏蔽门*/
|
// /** 屏蔽门*/
|
||||||
this.safeDoor = new ESafeDoor({
|
// this.safeDoor = new ESafeDoor({
|
||||||
zlevel: this.zlevel,
|
// zlevel: this.zlevel,
|
||||||
z: this.z,
|
// z: this.z,
|
||||||
style: style,
|
// style: style,
|
||||||
x: model.position.x,
|
// x: model.position.x,
|
||||||
y: model.position.y,
|
// y: model.position.y,
|
||||||
width: model.width,
|
// width: model.width,
|
||||||
height: style.StationStand.safetyDoor.height,
|
// height: style.StationStand.safetyDoor.height,
|
||||||
show: model.hasDoor
|
// show: model.hasDoor
|
||||||
});
|
// });
|
||||||
|
|
||||||
/** 站台紧急关闭*/
|
/** 站台紧急关闭*/
|
||||||
const emergentH = drict > 0 ? style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.height : style.StationStand.standEmergent.mergentR;
|
const emergentH = drict > 0 ? style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.height : style.StationStand.standEmergent.mergentR;
|
||||||
|
@ -10,6 +10,7 @@ import ZcControl from './ZcControl/index.js';
|
|||||||
import StationCounter from './StationCounter/index.js';
|
import StationCounter from './StationCounter/index.js';
|
||||||
import StationDelayUnlock from './StationDelayUnlock/index.js';
|
import StationDelayUnlock from './StationDelayUnlock/index.js';
|
||||||
import StationStand from './StationStand/index.js';
|
import StationStand from './StationStand/index.js';
|
||||||
|
import Psd from './Psd/index.js';
|
||||||
import TrainWindow from './TrainWindow/index.js';
|
import TrainWindow from './TrainWindow/index.js';
|
||||||
import Train from './Train/index.js';
|
import Train from './Train/index.js';
|
||||||
import Line from './Line/index.js';
|
import Line from './Line/index.js';
|
||||||
@ -29,6 +30,7 @@ mapShape[deviceType.ZcControl] = ZcControl;
|
|||||||
mapShape[deviceType.StationCounter] = StationCounter;
|
mapShape[deviceType.StationCounter] = StationCounter;
|
||||||
mapShape[deviceType.StationDelayUnlock] = StationDelayUnlock;
|
mapShape[deviceType.StationDelayUnlock] = StationDelayUnlock;
|
||||||
mapShape[deviceType.StationStand] = StationStand;
|
mapShape[deviceType.StationStand] = StationStand;
|
||||||
|
mapShape[deviceType.Psd] = Psd;
|
||||||
mapShape[deviceType.TrainWindow] = TrainWindow;
|
mapShape[deviceType.TrainWindow] = TrainWindow;
|
||||||
mapShape[deviceType.Train] = Train;
|
mapShape[deviceType.Train] = Train;
|
||||||
mapShape[deviceType.Line] = Line;
|
mapShape[deviceType.Line] = Line;
|
||||||
|
@ -75,6 +75,14 @@ export function parser(data, skinCode) {
|
|||||||
mapDevice[elem.code] = createDevice(deviceType.Line, elem, propConvert);
|
mapDevice[elem.code] = createDevice(deviceType.Line, elem, propConvert);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
zrUtil.each(data.espList || [], elem => {
|
||||||
|
mapDevice[elem.code] = createDevice(deviceType.Esp, elem, propConvert);
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
zrUtil.each(data.psdList || [], elem => {
|
||||||
|
mapDevice[elem.code] = createDevice(deviceType.Psd, elem, propConvert);
|
||||||
|
}, this);
|
||||||
|
|
||||||
zrUtil.each(data.textList || [], elem => {
|
zrUtil.each(data.textList || [], elem => {
|
||||||
mapDevice[elem.code] = createDevice(deviceType.Text, elem, propConvert);
|
mapDevice[elem.code] = createDevice(deviceType.Text, elem, propConvert);
|
||||||
}, this);
|
}, this);
|
||||||
@ -195,6 +203,8 @@ export function updateMapData(state, model) {
|
|||||||
case deviceType.TrainWindow: updateForList(model, state, 'trainWindowList'); break;
|
case deviceType.TrainWindow: updateForList(model, state, 'trainWindowList'); break;
|
||||||
case deviceType.Line: updateForList(model, state, 'lineList'); break;
|
case deviceType.Line: updateForList(model, state, 'lineList'); break;
|
||||||
case deviceType.Text: updateForList(model, state, 'textList'); break;
|
case deviceType.Text: updateForList(model, state, 'textList'); break;
|
||||||
|
case deviceType.Psd: updateForList(model, state, 'psdList'); break;
|
||||||
|
case deviceType.Esp: updateForList(model, state, 'espList'); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -580,6 +580,18 @@ const map = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
delMapStandData: (state, { models, type }) => {
|
||||||
|
models.forEach(item => {
|
||||||
|
if (state.mapDevice[item.code]) {
|
||||||
|
delete state.mapDevice[item.code];
|
||||||
|
state.map[type].forEach((elem, index) => {
|
||||||
|
if (item.code == elem.code) {
|
||||||
|
state.map[type].splice(index, 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
setDeleteCount: (state) => {
|
setDeleteCount: (state) => {
|
||||||
state.deleteCount++;
|
state.deleteCount++;
|
||||||
},
|
},
|
||||||
@ -695,6 +707,9 @@ const map = {
|
|||||||
commit('updateMapStandData', { models, type });
|
commit('updateMapStandData', { models, type });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
delMapStandData: ({ commit }, { models, type }) => {
|
||||||
|
commit('delMapStandData', { models, type });
|
||||||
|
},
|
||||||
setDeleteCount: ({ commit }) => {
|
setDeleteCount: ({ commit }) => {
|
||||||
commit('setDeleteCount');
|
commit('setDeleteCount');
|
||||||
},
|
},
|
||||||
|
@ -3,11 +3,11 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// BASE_API = 'https://joylink.club/jlcloud';
|
||||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||||
} else {
|
} else {
|
||||||
BASE_API = process.env.VUE_APP_BASE_API;
|
BASE_API = process.env.VUE_APP_BASE_API;
|
||||||
}
|
}
|
||||||
|
@ -1,154 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="height: 100%;">
|
|
||||||
<div style="height: calc(100% - 46px);">
|
|
||||||
<template v-if="!display">
|
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
|
||||||
<el-form ref="form" :model="editModel" label-width="120px" size="mini">
|
|
||||||
<el-form-item label="code" prop="code">
|
|
||||||
<el-select v-model="editModel.code" clearable :filterable="true" @change="deviceChange">
|
|
||||||
<el-option
|
|
||||||
v-for="item in espList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="名称" prop="name">
|
|
||||||
<el-input v-model="editModel.name" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所属站台" prop="stationStandCode">
|
|
||||||
<el-select v-model="editModel.stationStandCode" disabled>
|
|
||||||
<el-option
|
|
||||||
v-for="item in stationStandList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-scrollbar>
|
|
||||||
</template>
|
|
||||||
<template v-if="display">
|
|
||||||
<div style="text-align: center;padding-top: 20px;">暂无数据</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
<div class="button_box">
|
|
||||||
<el-button-group class="map-draft-group">
|
|
||||||
<el-button type="primary" size="small" @click="create">批量创建</el-button>
|
|
||||||
<el-button type="danger" size="small" @click="editObject">修改</el-button>
|
|
||||||
</el-button-group>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { deepAssign } from '@/utils/index';
|
|
||||||
import { getUID } from '@/jmap/utils/Uid';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SafetyDoorOperate',
|
|
||||||
components: {
|
|
||||||
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
mapInfo: {
|
|
||||||
type: Object,
|
|
||||||
default() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selected: {
|
|
||||||
type: Object,
|
|
||||||
default() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
display: true,
|
|
||||||
editModel: {
|
|
||||||
code: '',
|
|
||||||
name: '',
|
|
||||||
stationCode: '',
|
|
||||||
stationStandCode: ''
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'map',
|
|
||||||
'espList',
|
|
||||||
'stationStandList'
|
|
||||||
])
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.map.map': function(val) {
|
|
||||||
if (val) {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted () {
|
|
||||||
this.init();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
init() {
|
|
||||||
this.display = true;
|
|
||||||
const mapObject = this.map;
|
|
||||||
if (mapObject) {
|
|
||||||
if (mapObject.espList && mapObject.espList.length) {
|
|
||||||
this.display = false;
|
|
||||||
} else {
|
|
||||||
mapObject.espList = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
deviceChange(code) {
|
|
||||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
|
||||||
},
|
|
||||||
deviceSelect(selected) {
|
|
||||||
this.$refs.form && this.$refs.form.resetFields();
|
|
||||||
if (selected && selected._type.toUpperCase() === 'ESP'.toUpperCase()) {
|
|
||||||
this.editModel = deepAssign(this.editModel, selected);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
editObject() {
|
|
||||||
console.log(this.editModel, 111);
|
|
||||||
},
|
|
||||||
hasPSD(data) {
|
|
||||||
let falg = false;
|
|
||||||
this.map.espList.forEach(item => {
|
|
||||||
if (item.stationStandCode == data.code) {
|
|
||||||
falg = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return falg;
|
|
||||||
},
|
|
||||||
create() {
|
|
||||||
const arr = [];
|
|
||||||
this.map.stationStandList.forEach(item => {
|
|
||||||
if (item.visible && item.hasDoor && !this.hasPSD(item)) {
|
|
||||||
arr.push({
|
|
||||||
_type: 'ESP',
|
|
||||||
code: getUID('ESP'),
|
|
||||||
name: getUID('ESP'),
|
|
||||||
stationCode: item.stationCode,
|
|
||||||
stationStandCode: item.code
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (arr.length) {
|
|
||||||
this.display = false;
|
|
||||||
this.$message('创建完成');
|
|
||||||
this.$store.dispatch('map/updateMapStandData', {models: arr, type: 'espList'});
|
|
||||||
this.deviceSelect();
|
|
||||||
} else {
|
|
||||||
this.$message('暂无车站');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -53,20 +53,6 @@
|
|||||||
@setCenter="setCenter"
|
@setCenter="setCenter"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="站台屏蔽门" class="tab_pane_box" name="safetyDoor">
|
|
||||||
<psd-operate
|
|
||||||
ref="psdOperate"
|
|
||||||
:map-info="mapInfo"
|
|
||||||
:selected="selected"
|
|
||||||
/>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="站台紧急停车按钮" class="tab_pane_box" name="park">
|
|
||||||
<esp-operate
|
|
||||||
ref="espOperate"
|
|
||||||
:map-info="mapInfo"
|
|
||||||
:selected="selected"
|
|
||||||
/>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -78,8 +64,6 @@ import RouteOperate from './routeoperate/index';
|
|||||||
import RoutingOperate from './routingoperate/index';
|
import RoutingOperate from './routingoperate/index';
|
||||||
import AutomaticOperate from './automaticoperate/index';
|
import AutomaticOperate from './automaticoperate/index';
|
||||||
import PathOperate from './pathoperate/index';
|
import PathOperate from './pathoperate/index';
|
||||||
import PsdOperate from './psdOperate/index';
|
|
||||||
import EspOperate from './espOperate/index';
|
|
||||||
import SignalOperate from './signaloperate/index';
|
import SignalOperate from './signaloperate/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -89,8 +73,6 @@ export default {
|
|||||||
RoutingOperate,
|
RoutingOperate,
|
||||||
AutomaticOperate,
|
AutomaticOperate,
|
||||||
PathOperate,
|
PathOperate,
|
||||||
PsdOperate,
|
|
||||||
EspOperate,
|
|
||||||
SignalOperate
|
SignalOperate
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -1,154 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="height: 100%;">
|
|
||||||
<div style="height: calc(100% - 46px);">
|
|
||||||
<template v-if="!display">
|
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
|
||||||
<el-form ref="ruleForm" :model="editModel" label-width="120px" size="mini">
|
|
||||||
<el-form-item label="code" prop="code">
|
|
||||||
<el-select v-model="editModel.code" clearable :filterable="true" @change="deviceChange">
|
|
||||||
<el-option
|
|
||||||
v-for="item in psdList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="名称" prop="name">
|
|
||||||
<el-input v-model="editModel.name" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所属站台" prop="stationStandCode">
|
|
||||||
<el-select v-model="editModel.stationStandCode" disabled>
|
|
||||||
<el-option
|
|
||||||
v-for="item in stationStandList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-scrollbar>
|
|
||||||
</template>
|
|
||||||
<template v-if="display">
|
|
||||||
<div style="text-align: center;padding-top: 20px;">暂无数据</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
<div class="button_box">
|
|
||||||
<el-button-group class="map-draft-group">
|
|
||||||
<el-button type="primary" size="small" @click="create">批量创建</el-button>
|
|
||||||
<el-button type="danger" size="small" @click="editObject">修改</el-button>
|
|
||||||
</el-button-group>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { deepAssign } from '@/utils/index';
|
|
||||||
import { getUID } from '@/jmap/utils/Uid';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SafetyDoorOperate',
|
|
||||||
components: {
|
|
||||||
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
mapInfo: {
|
|
||||||
type: Object,
|
|
||||||
default() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selected: {
|
|
||||||
type: Object,
|
|
||||||
default() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
display: true,
|
|
||||||
editModel: {
|
|
||||||
code: '',
|
|
||||||
name: '',
|
|
||||||
stationCode: '',
|
|
||||||
stationStandCode: ''
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'map',
|
|
||||||
'psdList',
|
|
||||||
'stationStandList'
|
|
||||||
])
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.map.map': function(val) {
|
|
||||||
if (val) {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted () {
|
|
||||||
this.init();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
init() {
|
|
||||||
this.display = true;
|
|
||||||
const mapObject = this.map;
|
|
||||||
if (mapObject) {
|
|
||||||
if (mapObject.psdList && mapObject.psdList.length) {
|
|
||||||
this.display = false;
|
|
||||||
} else {
|
|
||||||
mapObject.psdList = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
deviceChange(code) {
|
|
||||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
|
||||||
},
|
|
||||||
deviceSelect(selected) {
|
|
||||||
this.$refs.ruleForm && this.$refs.ruleForm.resetFields();
|
|
||||||
if (selected && selected._type.toUpperCase() === 'PSD'.toUpperCase()) { // ESP
|
|
||||||
this.editModel = deepAssign(this.editModel, selected);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
editObject() {
|
|
||||||
console.log(this.editModel, 111);
|
|
||||||
},
|
|
||||||
hasPSD(data) {
|
|
||||||
let falg = false;
|
|
||||||
this.map.psdList.forEach(item => {
|
|
||||||
if (item.stationStandCode == data.code) {
|
|
||||||
falg = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return falg;
|
|
||||||
},
|
|
||||||
create() {
|
|
||||||
const arr = [];
|
|
||||||
this.map.stationStandList.forEach(item => {
|
|
||||||
if (item.visible && item.hasDoor && !this.hasPSD(item)) {
|
|
||||||
arr.push({
|
|
||||||
_type: 'PSD',
|
|
||||||
code: getUID('PSD'),
|
|
||||||
name: getUID('PSD'),
|
|
||||||
stationCode: item.stationCode,
|
|
||||||
stationStandCode: item.code
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (arr.length) {
|
|
||||||
this.display = false;
|
|
||||||
this.$message('创建完成');
|
|
||||||
this.$store.dispatch('map/updateMapStandData', {models: arr, type: 'psdList'});
|
|
||||||
this.deviceSelect();
|
|
||||||
} else {
|
|
||||||
this.$message('暂无车站');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
217
src/views/newMap/newMapdraft/mapoperate/espDraft.vue
Normal file
217
src/views/newMap/newMapdraft/mapoperate/espDraft.vue
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
<template>
|
||||||
|
<el-tabs v-model="activeName" class="card">
|
||||||
|
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
|
<div style="height: calc(100% - 46px);">
|
||||||
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
|
<div class="button_box">
|
||||||
|
<el-button-group class="map-draft-group">
|
||||||
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||||
|
<div style="height: calc(100% - 46px);">
|
||||||
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
|
<el-button type="primary" style="margin: 0 auto;display: block;" @click="create">批量创建</el-button>
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import { getUID } from '@/jmapNew/utils/Uid';
|
||||||
|
import ConfigList from './config/list';
|
||||||
|
import { deepAssign } from '@/utils/index';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'EspDraft',
|
||||||
|
components: {
|
||||||
|
ConfigList
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
selected: {
|
||||||
|
type: Object,
|
||||||
|
default: function () {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeName: 'first',
|
||||||
|
editModel: {
|
||||||
|
code: '',
|
||||||
|
name: '',
|
||||||
|
standCode: '' // 关联站台唯一code
|
||||||
|
},
|
||||||
|
field: '',
|
||||||
|
addModel: {
|
||||||
|
standCode: ''
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('map', [
|
||||||
|
'espList',
|
||||||
|
'stationStandList'
|
||||||
|
]),
|
||||||
|
form() {
|
||||||
|
return {
|
||||||
|
labelWidth: '130px',
|
||||||
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
|
draw: {
|
||||||
|
name: this.$t('map.drawData'),
|
||||||
|
item: [
|
||||||
|
{ prop: 'code', label: 'code', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.espList, change: true, deviceChange: this.deviceChange },
|
||||||
|
{ prop: 'name', label: '屏蔽门名称', type: 'input' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
map: {
|
||||||
|
name: this.$t('map.mapData'),
|
||||||
|
item: [
|
||||||
|
{ prop: 'standCode', label: '关联站台:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationStandList }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
rules() {
|
||||||
|
const rules = {
|
||||||
|
code: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseReSelectDevice'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
name: [
|
||||||
|
{ required: true, message: this.$t('rules.stationstandCountName'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
standCode: [
|
||||||
|
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// 清空表单验证提示信息
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.dataform &&
|
||||||
|
this.$refs.dataform.clearValidate();
|
||||||
|
});
|
||||||
|
|
||||||
|
return rules;
|
||||||
|
},
|
||||||
|
createRules() {
|
||||||
|
return {
|
||||||
|
standCode: [
|
||||||
|
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
selected: function (val, oldVal) {
|
||||||
|
this.deviceSelect(val);
|
||||||
|
},
|
||||||
|
'$store.state.map.deleteCount': function (val) {
|
||||||
|
this.deleteObj();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
deviceChange(code) {
|
||||||
|
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||||
|
this.edit();
|
||||||
|
},
|
||||||
|
hover(field) {
|
||||||
|
this.field = field === this.field ? '' : field;
|
||||||
|
this.$emit('standStationCode', this.field);
|
||||||
|
},
|
||||||
|
deviceSelect(selected) {
|
||||||
|
if (selected && selected._type.toUpperCase() === 'Esp'.toUpperCase()) {
|
||||||
|
this.$refs.dataform.resetFields();
|
||||||
|
this.activeName = 'first';
|
||||||
|
this.editModel = deepAssign(this.editModel, selected);
|
||||||
|
}
|
||||||
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase() && this.field.toUpperCase() === 'standSelectStationCode'.toUpperCase()) {
|
||||||
|
this.addModel.standCode = selected.code;
|
||||||
|
this.activeName = 'second';
|
||||||
|
this.field = '';
|
||||||
|
this.$emit('standStationCode', '');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hasPSD(data) {
|
||||||
|
let falg = false;
|
||||||
|
this.espList.forEach(item => {
|
||||||
|
if (item.standCode == data.code) {
|
||||||
|
falg = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return falg;
|
||||||
|
},
|
||||||
|
create() {
|
||||||
|
const arr = [];
|
||||||
|
this.stationStandList.forEach(item => {
|
||||||
|
if (item.visible && !this.hasPSD(item)) {
|
||||||
|
const uid = getUID('Esp', [...this.espList, ...arr]);
|
||||||
|
arr.push({
|
||||||
|
_type: 'Esp',
|
||||||
|
code: uid,
|
||||||
|
name: `Esp${[...this.espList, ...arr].length + 1}`,
|
||||||
|
standCode: item.code
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (arr.length) {
|
||||||
|
this.display = false;
|
||||||
|
this.$message('创建完成');
|
||||||
|
this.$store.dispatch('map/updateMapStandData', {models: arr, type: 'espList'});
|
||||||
|
this.deviceSelect();
|
||||||
|
} else {
|
||||||
|
this.$message('暂无新车站或车站已有对应紧急停车按钮!');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 修改对象
|
||||||
|
edit() {
|
||||||
|
this.$refs.dataform.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const data = Object.assign({_type: 'Esp'}, this.editModel);
|
||||||
|
console.log(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 删除对象
|
||||||
|
deleteObj() {
|
||||||
|
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||||
|
if (selected && selected._type.toUpperCase() === 'Esp'.toUpperCase()) {
|
||||||
|
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||||
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$store.dispatch('map/delMapStandData', {models: [selected], type: 'espList'});
|
||||||
|
this.deviceSelect();
|
||||||
|
this.$refs.dataform.resetFields();
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@import "src/styles/mixin.scss";
|
||||||
|
.view-control{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
@ -40,14 +40,6 @@
|
|||||||
@stationSectionCode="stationEnabledTab"
|
@stationSectionCode="stationEnabledTab"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- <el-tab-pane :label="$t('map.controlMode')" class="tab_pane_box" name="StationControl">
|
|
||||||
<station-control-draft
|
|
||||||
ref="StationControl"
|
|
||||||
:selected="selected"
|
|
||||||
@updateMapModel="updateMapModel"
|
|
||||||
@setCenter="setCenter"
|
|
||||||
/>
|
|
||||||
</el-tab-pane> -->
|
|
||||||
<el-tab-pane :label="$t('map.signal')" class="tab_pane_box" name="Signal">
|
<el-tab-pane :label="$t('map.signal')" class="tab_pane_box" name="Signal">
|
||||||
<signal-draft
|
<signal-draft
|
||||||
ref="Signal"
|
ref="Signal"
|
||||||
@ -66,6 +58,24 @@
|
|||||||
@standStationCode="standStationTab"
|
@standStationCode="standStationTab"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="屏蔽门" class="tab_pane_box" name="Psd">
|
||||||
|
<psd-draft
|
||||||
|
ref="PsdDraft"
|
||||||
|
:selected="selected"
|
||||||
|
@updateMapModel="updateMapModel"
|
||||||
|
@setCenter="setCenter"
|
||||||
|
@standStationCode="psdTab"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="站台紧急停车" class="tab_pane_box" name="Esp">
|
||||||
|
<esp-draft
|
||||||
|
ref="EspDraft"
|
||||||
|
:selected="selected"
|
||||||
|
@updateMapModel="updateMapModel"
|
||||||
|
@setCenter="setCenter"
|
||||||
|
@standStationCode="esqTab"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="$t('map.trainWindow')" class="tab_pane_box" name="TrainWindow">
|
<el-tab-pane :label="$t('map.trainWindow')" class="tab_pane_box" name="TrainWindow">
|
||||||
<train-window-draft
|
<train-window-draft
|
||||||
ref="TrainWindow"
|
ref="TrainWindow"
|
||||||
@ -175,6 +185,8 @@ import SwitchDraft from './switch';
|
|||||||
import SignalDraft from './signal/index';
|
import SignalDraft from './signal/index';
|
||||||
import StationDraft from './station';
|
import StationDraft from './station';
|
||||||
import StationStandDraft from './stationstand';
|
import StationStandDraft from './stationstand';
|
||||||
|
import PsdDraft from './psdDraft';
|
||||||
|
import EspDraft from './espDraft';
|
||||||
// import CounterDraft from './counter';
|
// import CounterDraft from './counter';
|
||||||
// import DelayUnlockDraft from './delayunlock';
|
// import DelayUnlockDraft from './delayunlock';
|
||||||
import TrainDraft from './train/index';
|
import TrainDraft from './train/index';
|
||||||
@ -198,6 +210,8 @@ export default {
|
|||||||
SignalDraft,
|
SignalDraft,
|
||||||
StationDraft,
|
StationDraft,
|
||||||
StationStandDraft,
|
StationStandDraft,
|
||||||
|
PsdDraft,
|
||||||
|
EspDraft,
|
||||||
// DelayUnlockDraft,
|
// DelayUnlockDraft,
|
||||||
TrainWindowDraft,
|
TrainWindowDraft,
|
||||||
TrainDraft,
|
TrainDraft,
|
||||||
@ -229,6 +243,7 @@ export default {
|
|||||||
stationType: '',
|
stationType: '',
|
||||||
switchType: '',
|
switchType: '',
|
||||||
stationStandType:'',
|
stationStandType:'',
|
||||||
|
psdType: '',
|
||||||
ViewMode: ViewMode,
|
ViewMode: ViewMode,
|
||||||
LogicalViewTypeList: [
|
LogicalViewTypeList: [
|
||||||
{ code: 'Link', name: this.$t('map.link') }
|
{ code: 'Link', name: this.$t('map.link') }
|
||||||
@ -296,6 +311,10 @@ export default {
|
|||||||
this.enabledTab = 'Signal';
|
this.enabledTab = 'Signal';
|
||||||
} else if (this.stationStandType) {
|
} else if (this.stationStandType) {
|
||||||
this.enabledTab = 'StationStand';
|
this.enabledTab = 'StationStand';
|
||||||
|
} else if (this.psdType) {
|
||||||
|
this.enabledTab = 'Psd';
|
||||||
|
} else if (this.esqType) {
|
||||||
|
this.enabledTab = 'Esp';
|
||||||
} else if (this.feild) {
|
} else if (this.feild) {
|
||||||
this.enabledTab = 'Section';
|
this.enabledTab = 'Section';
|
||||||
} else {
|
} else {
|
||||||
@ -309,6 +328,12 @@ export default {
|
|||||||
this.oldDevice = device;
|
this.oldDevice = device;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
esqTab(type) {
|
||||||
|
this.esqType = type;
|
||||||
|
},
|
||||||
|
psdTab(type) {
|
||||||
|
this.psdType = type;
|
||||||
|
},
|
||||||
standStationTab(type) {
|
standStationTab(type) {
|
||||||
this.stationStandType = type;
|
this.stationStandType = type;
|
||||||
},
|
},
|
||||||
|
302
src/views/newMap/newMapdraft/mapoperate/psdDraft.vue
Normal file
302
src/views/newMap/newMapdraft/mapoperate/psdDraft.vue
Normal file
@ -0,0 +1,302 @@
|
|||||||
|
<template>
|
||||||
|
<el-tabs v-model="activeName" class="card">
|
||||||
|
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
|
<div style="height: calc(100% - 46px);">
|
||||||
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
|
<div class="button_box">
|
||||||
|
<el-button-group class="map-draft-group">
|
||||||
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||||
|
<div style="height: calc(100% - 46px);">
|
||||||
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
|
<el-form ref="make" label-width="140px" :model="addModel" :rules="createRules" size="mini">
|
||||||
|
<el-form-item label="关联站台" prop="standCode">
|
||||||
|
<el-select v-model="addModel.standCode" filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in stationStandList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name + ' (' + item.code+ ')'"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<el-button
|
||||||
|
:type="field === 'standSelectStationCode' ? 'danger' : 'primary'"
|
||||||
|
size="small"
|
||||||
|
@click="hover('standSelectStationCode')"
|
||||||
|
>{{ $t('map.activate') }}</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="关联站台轨:" prop="standTrackCode">
|
||||||
|
<el-select v-model="addModel.standTrackCode" filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in PhysicalSectionList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name + ' (' + item.code+ ')'"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<el-button
|
||||||
|
:type="field === 'sectionSelectCode' ? 'danger' : 'primary'"
|
||||||
|
size="small"
|
||||||
|
@click="hover('sectionSelectCode')"
|
||||||
|
>{{ $t('map.activate') }}</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('map.stationstandDirection')" prop="doorLocationType">
|
||||||
|
<el-radio-group v-model="addModel.doorLocationType">
|
||||||
|
<el-radio v-for="item in DoorLocationTypeList" :key="item.code" :label="item.code" border>{{ item.name }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
|
<div class="button_box">
|
||||||
|
<el-button-group class="map-draft-group">
|
||||||
|
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import { getUID } from '@/jmapNew/utils/Uid';
|
||||||
|
import ConfigList from './config/list';
|
||||||
|
import { deepAssign } from '@/utils/index';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'PsdDraft',
|
||||||
|
components: {
|
||||||
|
ConfigList
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
selected: {
|
||||||
|
type: Object,
|
||||||
|
default: function () {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
DoorLocationTypeList: [],
|
||||||
|
activeName: 'first',
|
||||||
|
editModel: {
|
||||||
|
code: '',
|
||||||
|
name: '',
|
||||||
|
standCode: '', // 关联站台唯一code
|
||||||
|
standTrackCode: '', // 关联站台轨编码
|
||||||
|
width: 80,
|
||||||
|
height: 5,
|
||||||
|
position: { x: 0, y: 0 },
|
||||||
|
doorLocationType: '01' // 显示方向朝上或朝下
|
||||||
|
},
|
||||||
|
field: '',
|
||||||
|
addModel: {
|
||||||
|
standCode: '',
|
||||||
|
standTrackCode: '',
|
||||||
|
doorLocationType: '01' // 显示方向朝上或朝下
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('map', [
|
||||||
|
'psdList',
|
||||||
|
'stationStandList',
|
||||||
|
'sectionList'
|
||||||
|
]),
|
||||||
|
form() {
|
||||||
|
return {
|
||||||
|
labelWidth: '130px',
|
||||||
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
|
draw: {
|
||||||
|
name: this.$t('map.drawData'),
|
||||||
|
item: [
|
||||||
|
{ prop: 'code', label: 'code', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.psdList, change: true, deviceChange: this.deviceChange },
|
||||||
|
{ prop: 'name', label: '屏蔽门名称', type: 'input' },
|
||||||
|
{ prop: 'position', label: '屏蔽门坐标', type: 'coordinate', width: '120px', children: [
|
||||||
|
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||||
|
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
|
] },
|
||||||
|
{ prop: 'doorLocationType', label: '显示方向:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.DoorLocationTypeList },
|
||||||
|
{ prop: 'standTrackCode', label: '关联区段:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList },
|
||||||
|
{ prop: 'width', label: '屏蔽门宽度', type: 'number', min: 0, max: 2000, placeholder: 'px' },
|
||||||
|
{ prop: 'height', label: '屏蔽门高度', type: 'number', min: 0, max: 2000, placeholder: 'px' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
map: {
|
||||||
|
name: this.$t('map.mapData'),
|
||||||
|
item: [
|
||||||
|
{ prop: 'standCode', label: '关联站台:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationStandList }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
rules() {
|
||||||
|
const rules = {
|
||||||
|
code: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseReSelectDevice'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
name: [
|
||||||
|
{ required: true, message: this.$t('rules.stationstandCountName'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
standCode: [
|
||||||
|
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
standTrackCode: [
|
||||||
|
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
'position.x': [
|
||||||
|
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
'position.y': [
|
||||||
|
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'change' }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// 清空表单验证提示信息
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.dataform &&
|
||||||
|
this.$refs.dataform.clearValidate();
|
||||||
|
});
|
||||||
|
|
||||||
|
return rules;
|
||||||
|
},
|
||||||
|
createRules() {
|
||||||
|
return {
|
||||||
|
standCode: [
|
||||||
|
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
standTrackCode: [
|
||||||
|
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
doorLocationType: [
|
||||||
|
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
PhysicalSectionList() {
|
||||||
|
let list = [];
|
||||||
|
if (this.sectionList && this.sectionList.length) {
|
||||||
|
list = this.sectionList.filter(elem => { return elem.type === '01'; });
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
selected: function (val, oldVal) {
|
||||||
|
this.deviceSelect(val);
|
||||||
|
},
|
||||||
|
'$store.state.map.deleteCount': function (val) {
|
||||||
|
this.deleteObj();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$Dictionary.doorLocationType().then(list => {
|
||||||
|
this.DoorLocationTypeList = list;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
deviceChange(code) {
|
||||||
|
this.$emit('setCenter', code);
|
||||||
|
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||||
|
this.edit();
|
||||||
|
},
|
||||||
|
hover(field) {
|
||||||
|
this.field = field === this.field ? '' : field;
|
||||||
|
this.$emit('standStationCode', this.field);
|
||||||
|
},
|
||||||
|
deviceSelect(selected) {
|
||||||
|
if (selected && selected._type.toUpperCase() === 'Psd'.toUpperCase()) {
|
||||||
|
this.$refs.dataform.resetFields();
|
||||||
|
this.activeName = 'first';
|
||||||
|
this.editModel = deepAssign(this.editModel, selected);
|
||||||
|
}
|
||||||
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase() && this.field.toUpperCase() === 'standSelectStationCode'.toUpperCase()) {
|
||||||
|
this.addModel.standCode = selected.code;
|
||||||
|
this.activeName = 'second';
|
||||||
|
this.field = '';
|
||||||
|
this.$emit('standStationCode', '');
|
||||||
|
}
|
||||||
|
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'sectionSelectCode'.toUpperCase()) {
|
||||||
|
this.addModel.standTrackCode = selected.code;
|
||||||
|
this.activeName = 'second';
|
||||||
|
this.field = '';
|
||||||
|
this.$emit('standStationCode', '');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
create() {
|
||||||
|
this.$refs.make.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const uid = getUID('Psd', this.psdList);
|
||||||
|
const model = {
|
||||||
|
_type: 'Psd',
|
||||||
|
code: uid,
|
||||||
|
name: `Psd${this.psdList.length + 1}`,
|
||||||
|
width: this.addModel.width,
|
||||||
|
height: this.addModel.height,
|
||||||
|
standCode: this.addModel.standCode, // 关联站台唯一code
|
||||||
|
standTrackCode: this.addModel.standTrackCode // 关联站台轨编码
|
||||||
|
};
|
||||||
|
this.stationStandList.forEach(elem => {
|
||||||
|
if (elem.code === this.addModel.standCode) {
|
||||||
|
model.position = { x: elem.position.x, y: elem.position.y };
|
||||||
|
if (this.addModel.doorLocationType == '01') { // 朝下
|
||||||
|
model.position = { x: elem.position.x, y: elem.position.y + ( 2 * elem.height) };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.$emit('updateMapModel', model);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 修改对象
|
||||||
|
edit() {
|
||||||
|
this.$refs.dataform.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const data = Object.assign({_type: 'Psd'}, this.editModel);
|
||||||
|
this.$emit('updateMapModel', data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 删除对象
|
||||||
|
deleteObj() {
|
||||||
|
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||||
|
if (selected && selected._type.toUpperCase() === 'Psd'.toUpperCase()) {
|
||||||
|
const _that = this;
|
||||||
|
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||||
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||||
|
_that.deviceSelect();
|
||||||
|
this.$refs.dataform.resetFields();
|
||||||
|
}).catch(() => {
|
||||||
|
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@import "src/styles/mixin.scss";
|
||||||
|
.view-control{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
@ -369,6 +369,9 @@ export default {
|
|||||||
{ prop: 'leftSectionCode', label: this.$t('map.leftAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.PhysicalSectionList, hover: this.hover, buttonType: 'leftSection', buttonShowType: this.isLeftSectionButtonShow, isHidden: !this.hasAssociatedSection},
|
{ prop: 'leftSectionCode', label: this.$t('map.leftAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.PhysicalSectionList, hover: this.hover, buttonType: 'leftSection', buttonShowType: this.isLeftSectionButtonShow, isHidden: !this.hasAssociatedSection},
|
||||||
{ prop: 'rightSectionCode', label: this.$t('map.rightAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.PhysicalSectionList, hover: this.hover, buttonType: 'rightSection', buttonShowType: this.isRightSectionButtonShow, isHidden: !this.hasAssociatedSection},
|
{ prop: 'rightSectionCode', label: this.$t('map.rightAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.PhysicalSectionList, hover: this.hover, buttonType: 'rightSection', buttonShowType: this.isRightSectionButtonShow, isHidden: !this.hasAssociatedSection},
|
||||||
{ prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode },
|
{ prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode },
|
||||||
|
{ prop: 'sepTypeLeft', label: this.$t('map.sepTypeLeft'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType },
|
||||||
|
{ prop: 'sepTypeRight', label: this.$t('map.sepTypeRight'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType },
|
||||||
|
{ prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, pointDisabled: this.isStationCodeDisabled, addPoint: this.addPoint, delPoint: this.delPoint, lastDisabled: true },
|
||||||
|
|
||||||
{ prop: 'isStandTrack', label: this.$t('map.isStandTrack'), type: 'checkbox', isHidden: !this.isStandTrackShow }, // 1
|
{ prop: 'isStandTrack', label: this.$t('map.isStandTrack'), type: 'checkbox', isHidden: !this.isStandTrackShow }, // 1
|
||||||
|
|
||||||
@ -408,15 +411,12 @@ export default {
|
|||||||
{value: true, label: this.$t('map.fromSmallToLarge')},
|
{value: true, label: this.$t('map.fromSmallToLarge')},
|
||||||
{value: false, label: this.$t('map.fromLargeToSmall')}
|
{value: false, label: this.$t('map.fromLargeToSmall')}
|
||||||
] }, // 1
|
] }, // 1
|
||||||
{ prop: 'sepTypeLeft', label: this.$t('map.sepTypeLeft'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType },
|
|
||||||
{ prop: 'sepTypeRight', label: this.$t('map.sepTypeRight'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType },
|
|
||||||
{ prop: 'isSegmentation', label: this.$t('map.isSegmentation'), type: 'checkbox', isHidden: !this.isSwitchSectionType },
|
{ prop: 'isSegmentation', label: this.$t('map.isSegmentation'), type: 'checkbox', isHidden: !this.isSwitchSectionType },
|
||||||
{ prop: 'segmentationPosition', label: this.$t('map.segmentationPosition'), type: 'coordinate', width: '150px', isHidden: !this.issegmentationPosition, children: [
|
{ prop: 'segmentationPosition', label: this.$t('map.segmentationPosition'), type: 'coordinate', width: '150px', isHidden: !this.issegmentationPosition, children: [
|
||||||
{ prop: 'segmentationPosition.x', firstLevel: 'segmentationPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: true },
|
{ prop: 'segmentationPosition.x', firstLevel: 'segmentationPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: true },
|
||||||
{ prop: 'segmentationPosition.y', firstLevel: 'segmentationPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: true }
|
{ prop: 'segmentationPosition.y', firstLevel: 'segmentationPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: true }
|
||||||
] },
|
] },
|
||||||
{ prop: 'isCurve', label: this.$t('map.isCurve'), type: 'checkbox', isHidden: !this.isSwitchSectionType },
|
{ prop: 'isCurve', label: this.$t('map.isCurve'), type: 'checkbox', isHidden: !this.isSwitchSectionType }
|
||||||
{ prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, pointDisabled: this.isStationCodeDisabled, addPoint: this.addPoint, delPoint: this.delPoint, lastDisabled: true }
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
map: {
|
map: {
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
@click="hover('standSelectStationCode')"
|
@click="hover('standSelectStationCode')"
|
||||||
>{{ $t('map.activate') }}</el-button>
|
>{{ $t('map.activate') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('map.stationstandDirection')" prop="doorLocationType">
|
<!-- <el-form-item :label="$t('map.stationstandDirection')" prop="doorLocationType">
|
||||||
<el-select v-model="addModel.doorLocationType" filterable :placeholder="$t('map.pleaseSelect')">
|
<el-select v-model="addModel.doorLocationType" filterable :placeholder="$t('map.pleaseSelect')">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in DoorLocationTypeList"
|
v-for="item in DoorLocationTypeList"
|
||||||
@ -41,10 +41,10 @@
|
|||||||
:value="item.code"
|
:value="item.code"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item :label="$t('map.stationstandHasDoor')" prop="hasDoor">
|
<!-- <el-form-item :label="$t('map.stationstandHasDoor')" prop="hasDoor">
|
||||||
<el-checkbox v-model="addModel.hasDoor" />
|
<el-checkbox v-model="addModel.hasDoor" />
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
@ -88,26 +88,22 @@ export default {
|
|||||||
editModel: {
|
editModel: {
|
||||||
code: '',
|
code: '',
|
||||||
name: '',
|
name: '',
|
||||||
nameShow: '',
|
// doorLocationType: '', // 站台方向
|
||||||
doorLocationType: '',
|
deviceStationCode: '', // 设备集中站
|
||||||
deviceStationCode: '',
|
// hasDoor: false, // 屏蔽门是否显示
|
||||||
hasDoor: false,
|
|
||||||
width: 0,
|
width: 0,
|
||||||
height: 0,
|
height: 0,
|
||||||
stationCode: '',
|
stationCode: '', // 所属车站
|
||||||
position: {
|
position: { x: 0, y: 0 },
|
||||||
x: 0,
|
visible: true // 是否显示
|
||||||
y: 0
|
// direction: '' // 上下行方向
|
||||||
},
|
|
||||||
visible: true,
|
|
||||||
direction: ''
|
|
||||||
},
|
},
|
||||||
field: '',
|
field: '',
|
||||||
addModel: {
|
addModel: {
|
||||||
stationCode: '',
|
stationCode: '',
|
||||||
doorLocationType: '01',
|
// doorLocationType: '01',
|
||||||
deviceStationCode: '',
|
deviceStationCode: ''
|
||||||
hasDoor: true
|
// hasDoor: true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -129,24 +125,21 @@ export default {
|
|||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
item: [
|
||||||
{ prop: 'code', label: this.$t('map.relStandCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationStandList, change: true, deviceChange: this.deviceChange },
|
{ prop: 'code', label: this.$t('map.relStandCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationStandList, change: true, deviceChange: this.deviceChange },
|
||||||
{ prop: 'name', label: this.$t('map.stationstandNameColon'), type: 'input', change:true, deviceChange:this.updateView },
|
{ prop: 'name', label: this.$t('map.stationstandNameColon'), type: 'input' },
|
||||||
{ prop: 'position', label: this.$t('map.stationstandPosition'), type: 'coordinate', width: '120px', children: [
|
{ prop: 'position', label: this.$t('map.stationstandPosition'), type: 'coordinate', width: '120px', children: [
|
||||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px', change:true, deviceChange:this.updateView },
|
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px', change:true, deviceChange:this.updateView }
|
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
] },
|
] },
|
||||||
{ prop: 'direction', label: this.$t('map.stationstandTopBottom'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.RunDirectionTypeList, change: true, deviceChange:this.updateView },
|
{ prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
|
||||||
{ prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox', change: true, deviceChange: this.updateView},
|
{ prop: 'width', label: this.$t('map.stationstandWidth'), type: 'number', min: 0, max: 2000, placeholder: 'px' },
|
||||||
{ prop: 'doorLocationType', label: this.$t('map.stationstandDirection'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.DoorLocationTypeList, change: true, deviceChange:this.updateView },
|
{ prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' }
|
||||||
{ prop: 'hasDoor', label: this.$t('map.stationstandHasDoor'), type: 'checkbox', change: true, deviceChange:this.updateView },
|
|
||||||
{ prop: 'width', label: this.$t('map.stationstandWidth'), type: 'number', min: 0, max: 2000, placeholder: 'px', change:true, deviceChange:this.updateView},
|
|
||||||
{ prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px', change:true, deviceChange:this.updateView}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
map: {
|
map: {
|
||||||
name: this.$t('map.mapData'),
|
name: this.$t('map.mapData'),
|
||||||
item: [
|
item: [
|
||||||
{ prop: 'deviceStationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList, change: true, deviceChange:this.updateView, disabled:true},
|
{ prop: 'deviceStationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList, disabled:true},
|
||||||
{ prop: 'stationCode', label: this.$t('map.belongsStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, change: true, deviceChange:this.updateView }
|
{ prop: 'stationCode', label: this.$t('map.belongsStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -164,12 +157,6 @@ export default {
|
|||||||
name: [
|
name: [
|
||||||
{ required: true, message: this.$t('rules.stationstandCountName'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.stationstandCountName'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
doorLocationType: [
|
|
||||||
{ required: true, message: this.$t('rules.doorLocationType'), trigger: 'change' }
|
|
||||||
],
|
|
||||||
direction: [
|
|
||||||
{ required: true, message: this.$t('rules.stationstandDirection'), trigger: 'change' }
|
|
||||||
],
|
|
||||||
width: [
|
width: [
|
||||||
{ required: true, message: this.$t('rules.stationstandWidth'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.stationstandWidth'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
@ -195,9 +182,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
stationCode: [
|
stationCode: [
|
||||||
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||||
],
|
|
||||||
doorLocationType: [
|
|
||||||
{ required: true, message: this.$t('rules.doorLocationType'), trigger: 'change' }
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -221,9 +205,6 @@ export default {
|
|||||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||||
this.edit();
|
this.edit();
|
||||||
},
|
},
|
||||||
updateView() {
|
|
||||||
this.edit();
|
|
||||||
},
|
|
||||||
changeStation(data) {
|
changeStation(data) {
|
||||||
const station = this.stationList.find(elem => { return elem.code == data; });
|
const station = this.stationList.find(elem => { return elem.code == data; });
|
||||||
if (station) {
|
if (station) {
|
||||||
@ -259,14 +240,14 @@ export default {
|
|||||||
const model = {
|
const model = {
|
||||||
_type: 'StationStand',
|
_type: 'StationStand',
|
||||||
code: uid,
|
code: uid,
|
||||||
name: `PF${this.stationStandList.length}`,
|
name: `PF${this.stationStandList.length + 1}`,
|
||||||
width: 40,
|
width: 40,
|
||||||
height: 20,
|
height: 20,
|
||||||
doorLocationType: this.addModel.doorLocationType,
|
// doorLocationType: this.addModel.doorLocationType,
|
||||||
deviceStationCode: this.addModel.deviceStationCode,
|
deviceStationCode: this.addModel.deviceStationCode,
|
||||||
visible: true,
|
visible: true
|
||||||
direction: '01',
|
// direction: '01',
|
||||||
hasDoor: this.addModel.hasDoor
|
// hasDoor: this.addModel.hasDoor
|
||||||
};
|
};
|
||||||
this.stationList.forEach(elem => {
|
this.stationList.forEach(elem => {
|
||||||
if (elem.code === this.addModel.stationCode) {
|
if (elem.code === this.addModel.stationCode) {
|
||||||
|
Loading…
Reference in New Issue
Block a user