|
|
|
@ -146,6 +146,7 @@ const gas = computed(() => { |
|
|
|
var rsrp: (number | null)[] = [] |
|
|
|
var rsrq: (number | null)[] = [] |
|
|
|
var sinr: (number | null)[] = [] |
|
|
|
var boot: (number | null)[] = [] |
|
|
|
|
|
|
|
var time: string[] = [] |
|
|
|
historicalData.value |
|
|
|
@ -187,6 +188,11 @@ const gas = computed(() => { |
|
|
|
rsrq.push(null) |
|
|
|
sinr.push(null) |
|
|
|
} |
|
|
|
if (item.boot) { |
|
|
|
boot.push(item.boot / 60) |
|
|
|
} else { |
|
|
|
boot.push(null) |
|
|
|
} |
|
|
|
|
|
|
|
time.push(item.timeStr) |
|
|
|
}) |
|
|
|
@ -199,7 +205,8 @@ const gas = computed(() => { |
|
|
|
rsrp, |
|
|
|
rsrq, |
|
|
|
sinr, |
|
|
|
time |
|
|
|
time, |
|
|
|
boot |
|
|
|
} |
|
|
|
}) |
|
|
|
const gasLineOptions = computed<EChartsOption>(() => { |
|
|
|
@ -250,73 +257,92 @@ const gasLineOptions = computed<EChartsOption>(() => { |
|
|
|
|
|
|
|
animationEasing: 'cubicInOut' |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
name: '电池电量', |
|
|
|
name: 'RSSI', |
|
|
|
smooth: true, |
|
|
|
type: 'line', |
|
|
|
yAxisIndex: 1, |
|
|
|
yAxisIndex: 0, |
|
|
|
symbol: 'none', |
|
|
|
data: gas.value.battery, |
|
|
|
data: gas.value.rssi, |
|
|
|
animationDuration: 2800, |
|
|
|
animationEasing: 'cubicInOut' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '内存占用', |
|
|
|
name: 'RSRP', |
|
|
|
smooth: true, |
|
|
|
type: 'line', |
|
|
|
yAxisIndex: 1, |
|
|
|
yAxisIndex: 0, |
|
|
|
symbol: 'none', |
|
|
|
data: gas.value.mem, |
|
|
|
data: gas.value.rsrp, |
|
|
|
animationDuration: 2800, |
|
|
|
animationEasing: 'cubicInOut', |
|
|
|
tooltip: { |
|
|
|
valueFormatter: function (value) { |
|
|
|
if (value === null || value === undefined || isNaN(value)) { |
|
|
|
return '-' |
|
|
|
} |
|
|
|
return Number(value).toFixed(3) + 'KB' // 返回带单位的字符串 |
|
|
|
} |
|
|
|
} |
|
|
|
animationEasing: 'cubicInOut' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'RSSI', |
|
|
|
name: 'RSRQ', |
|
|
|
smooth: true, |
|
|
|
type: 'line', |
|
|
|
yAxisIndex: 0, |
|
|
|
symbol: 'none', |
|
|
|
data: gas.value.rssi, |
|
|
|
data: gas.value.rsrq, |
|
|
|
animationDuration: 2800, |
|
|
|
animationEasing: 'cubicInOut' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'RSRP', |
|
|
|
name: 'SINR', |
|
|
|
smooth: true, |
|
|
|
type: 'line', |
|
|
|
yAxisIndex: 0, |
|
|
|
symbol: 'none', |
|
|
|
data: gas.value.rsrp, |
|
|
|
data: gas.value.sinr, |
|
|
|
animationDuration: 2800, |
|
|
|
animationEasing: 'cubicInOut' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'RSRQ', |
|
|
|
name: '电池电量', |
|
|
|
smooth: true, |
|
|
|
type: 'line', |
|
|
|
yAxisIndex: 0, |
|
|
|
yAxisIndex: 1, |
|
|
|
symbol: 'none', |
|
|
|
data: gas.value.rsrq, |
|
|
|
data: gas.value.battery, |
|
|
|
animationDuration: 2800, |
|
|
|
animationEasing: 'cubicInOut' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'SINR', |
|
|
|
name: '内存占用', |
|
|
|
smooth: true, |
|
|
|
type: 'line', |
|
|
|
yAxisIndex: 0, |
|
|
|
yAxisIndex: 1, |
|
|
|
symbol: 'none', |
|
|
|
data: gas.value.sinr, |
|
|
|
data: gas.value.mem, |
|
|
|
animationDuration: 2800, |
|
|
|
animationEasing: 'cubicInOut' |
|
|
|
animationEasing: 'cubicInOut', |
|
|
|
tooltip: { |
|
|
|
valueFormatter: function (value) { |
|
|
|
if (value === null || value === undefined || isNaN(value)) { |
|
|
|
return '-' |
|
|
|
} |
|
|
|
return Number(value).toFixed(3) + 'KB' // 返回带单位的字符串 |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '系统运行时间', |
|
|
|
smooth: true, |
|
|
|
type: 'line', |
|
|
|
yAxisIndex: 1, |
|
|
|
symbol: 'none', |
|
|
|
data: gas.value.boot, |
|
|
|
animationDuration: 2800, |
|
|
|
animationEasing: 'cubicInOut', |
|
|
|
tooltip: { |
|
|
|
valueFormatter: function (value) { |
|
|
|
if (value === null || value === undefined || isNaN(value)) { |
|
|
|
return '-' |
|
|
|
} |
|
|
|
return Number(value).toFixed(3) + '分钟' // 返回带单位的字符串 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
|