变频器耐受表X轴改用对数刻度、补充错误码

This commit is contained in:
caozehui
2026-04-22 19:32:28 +08:00
parent b826f505ac
commit 8744dfb0d8
2 changed files with 12 additions and 6 deletions

View File

@@ -236,13 +236,13 @@ const chartOptions = computed(() => {
data: ['特性测试曲线'] data: ['特性测试曲线']
}, },
xAxis: { xAxis: {
type: 'value', type: 'log',
name: '持续时间(s)', name: '持续时间(s)',
nameLocation: 'middle', nameLocation: 'middle',
nameGap: 34, nameGap: 34,
min: 0.00, min: 0.01,
max: maxDuration, max: 60,
interval: 0.1, logBase: 10,
minorTick: { minorTick: {
show: true, show: true,
splitNumber: 10 splitNumber: 10

View File

@@ -93,7 +93,13 @@ const SOCKET_ERROR_MESSAGE_MAP: Record<number, string> = {
10552: '重复的初始化操作', 10552: '重复的初始化操作',
10553: '通讯模块通讯异常', 10553: '通讯模块通讯异常',
10554: '报文解析异常', 10554: '报文解析异常',
10556: '不存在上线的设备' 10556: '不存在上线的设备',
400:'请求格式或者参数错误',
404:'未知错误',
// 408:'超时',
// 409:'业务执行不符合预期',
500:'未知错误'
} }
const normalizeFormalRealPayload = (payload: any) => { const normalizeFormalRealPayload = (payload: any) => {
@@ -121,7 +127,7 @@ const handleSocketMessage = (payload: any) => {
const normalizedRequestId = requestId.trim().toLowerCase() const normalizedRequestId = requestId.trim().toLowerCase()
const code = Number(payload?.code) const code = Number(payload?.code)
if (requestId === 'yjc_sbtxjy' && code !== 10200) { if (requestId === 'yjc_sbtxjy' && code !== 10200 || code in SOCKET_ERROR_MESSAGE_MAP) {
hasSocketError.value = true hasSocketError.value = true
ElMessage.error(SOCKET_ERROR_MESSAGE_MAP[code] || `检测异常,错误码:${code}`) ElMessage.error(SOCKET_ERROR_MESSAGE_MAP[code] || `检测异常,错误码:${code}`)
return return