feat: 添加JT808原始数据收集功能
Some checks failed
iot-test-platform CI/CD / build-and-deploy (push) Failing after 45s
Some checks failed
iot-test-platform CI/CD / build-and-deploy (push) Failing after 45s
This commit is contained in:
@@ -2,7 +2,10 @@ server:
|
||||
port: 8080
|
||||
|
||||
jt808:
|
||||
port: 20048
|
||||
port: 8091
|
||||
raw-data:
|
||||
enabled: true
|
||||
output-dir: ./raw-data
|
||||
|
||||
logging:
|
||||
level:
|
||||
|
||||
@@ -383,7 +383,7 @@
|
||||
<div v-if="counter.latestData" class="small text-muted d-flex justify-content-between">
|
||||
<span><i class="far fa-clock me-1"></i>{{ formatCounterTime(counter.latestData.time) }}</span>
|
||||
<span>
|
||||
<i class="fas fa-battery-half me-1"></i>Rx:{{counter.latestData.rxBat}}% / Tx:{{counter.latestData.txBat}}%
|
||||
<i class="fas fa-battery-half me-1"></i>接收端电量:{{counter.latestData.rxBat}}% / 电量:{{counter.latestData.txBat}}%
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -576,8 +576,15 @@
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify(payload)
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error(`HTTP ${res.status}`);
|
||||
}
|
||||
|
||||
const result = await res.json();
|
||||
if (result.code !== 200) alert('Error: ' + result.message);
|
||||
if (result.code !== 200) {
|
||||
alert('Error: ' + (result.message || result.msg || '未知错误'));
|
||||
}
|
||||
} catch (e) {
|
||||
alert('发送失败: ' + e.message);
|
||||
}
|
||||
@@ -647,7 +654,7 @@
|
||||
});
|
||||
const result = await res.json();
|
||||
if (result.code === 200) alert('指令已发送');
|
||||
else alert('失败: ' + result.message);
|
||||
else alert('失败: ' + (result.message || '未知错误'));
|
||||
|
||||
} else if (this.commandForm.apiType === 'text') {
|
||||
// 调用 /api/v1/device/command/text
|
||||
@@ -663,7 +670,7 @@
|
||||
});
|
||||
const result = await res.json();
|
||||
if (result.code === 200) alert('指令已发送');
|
||||
else alert('失败: ' + result.message);
|
||||
else alert('失败: ' + (result.message || '未知错误'));
|
||||
|
||||
} else {
|
||||
// 通用指令接口 /api/v1/device/command/send
|
||||
@@ -676,7 +683,7 @@
|
||||
});
|
||||
const result = await res.json();
|
||||
if (result.code === 200) alert('指令已发送');
|
||||
else alert('失败: ' + result.message);
|
||||
else alert('失败: ' + (result.message || '未知错误'));
|
||||
}
|
||||
} catch (e) {
|
||||
alert('发送异常: ' + e.message);
|
||||
|
||||
Reference in New Issue
Block a user