列车信息调整

This commit is contained in:
dong 2023-07-27 14:43:36 +08:00
parent 779b39d1fc
commit f85d4a9782

View File

@ -40,11 +40,19 @@ const list: keyType[] = [
{ label: '列车索引', key: 'id' },
{ label: '是否上行', key: 'up', formatFn: upFormat },
{ label: '车头所在link的索引', key: 'headLinkId' },
{ label: '车头所在link内的偏移量', key: 'headLinkOffset' },
{
label: '车头所在link内的偏移量',
key: 'headLinkOffset',
formatFn: offsetFormat,
},
{ label: '车尾所在link的索引', key: 'tailLinkId' },
{ label: '车尾所在link内的偏移量', key: 'tailLinkOffset' },
{
label: '车尾所在link内的偏移量',
key: 'tailLinkOffset',
formatFn: offsetFormat,
},
{ label: '生命信号', key: 'heartbeat' },
{ label: '列车所在位置坡度值', key: 'slope' },
{ label: '列车所在位置坡度值', key: 'slope', formatFn: slopeFormat },
{ label: '列车所在位置坡度走势', key: 'upslope', formatFn: upslopeFormat },
{ label: '列车当前运行方向', key: 'runningUp', formatFn: runningUpFormat },
{
@ -72,11 +80,17 @@ function upslopeFormat(v: boolean) {
function runningUpFormat(v: boolean) {
return v ? '上行' : '下行';
}
function offsetFormat(v: number) {
return `${v} mm`;
}
function slopeFormat(v: number) {
return `${v}`;
}
function resistanceFormat(v: number) {
return `${v}KN`;
return `${v} KN`;
}
function speedFormat(v: number) {
return `${v}km/h`;
return `${v} km/h`;
}
watch(
() => lineStore.selectedGraphics,