chore: 添加设备展示实时数据卡片(蓝牙工牌、客流计数器)语音播报完善

This commit is contained in:
lzh
2025-12-28 01:38:48 +08:00
parent ab74071378
commit 0285a3e275

View File

@@ -151,7 +151,10 @@ async function sendTTS() {
method: IotDeviceMessageMethodEnum.SERVICE_INVOKE.method,
params: {
identifier: 'TTS',
params: { text: ttsText.value },
params: {
tts_text: ttsText.value,
tts_flag: 9,
},
},
});
message.success('语音播报已发送');
@@ -259,7 +262,9 @@ onBeforeUnmount(() => {
{{ formatDateTime(lastUpdateTime) }}
</span>
<Button size="small" @click="fetchAllData" :loading="loading">
<template #icon><IconifyIcon icon="mdi:refresh" /></template>
<template #icon>
<IconifyIcon icon="mdi:refresh" />
</template>
刷新
</Button>
</div>
@@ -273,13 +278,8 @@ onBeforeUnmount(() => {
<div v-for="(device, index) in bluetoothDevices" :key="index" class="bluetooth-item">
<span class="bt-mac">{{ device.mac }}</span>
<div class="bt-rssi">
<Progress
:percent="Math.max(0, 100 + device.rssi)"
:stroke-color="getRssiColor(device.rssi)"
:show-info="false"
size="small"
style="width: 50px"
/>
<Progress :percent="Math.max(0, 100 + device.rssi)" :stroke-color="getRssiColor(device.rssi)"
:show-info="false" size="small" style="width: 50px" />
<span class="rssi-val" :style="{ color: getRssiColor(device.rssi) }">{{ device.rssi }}dBm</span>
</div>
</div>