This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<view class="device-metrics flex-row-sb mt-md">
|
||||
<view class="metric-item flex-col-center">
|
||||
<view class="caption mb-xs">信号强度</view>
|
||||
<view class="metric-value">{{ getSignalText(deviceInfo) }}</view>
|
||||
<view class="metric-value">{{ deviceInfo.signal_quality || '暂无数据' }}</view>
|
||||
</view>
|
||||
<view class="metric-item flex-col-center">
|
||||
<view class="caption mb-xs">设备电量</view>
|
||||
@@ -36,12 +36,14 @@
|
||||
<view class="metric-value">{{ deviceInfo.connCnt }}/{{ deviceInfo.max_clients }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="deviceInfo.signal_bad_reason" class="signal-reason">
|
||||
<text class="signal-reason-label">怀疑原因:</text>
|
||||
<text class="signal-reason-text">{{ deviceInfo.signal_bad_reason }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getNetworkLevelByMetrics } from '@/utils/networkSignal.js';
|
||||
|
||||
defineProps({
|
||||
deviceInfo: { type: Object, default: () => ({}) },
|
||||
isRealName: { type: Boolean, default: false },
|
||||
@@ -50,9 +52,6 @@
|
||||
});
|
||||
|
||||
defineEmits(['authentication']);
|
||||
|
||||
const getSignalText = (deviceInfo) =>
|
||||
getNetworkLevelByMetrics(deviceInfo?.rsrp, deviceInfo?.rsrq, deviceInfo?.sinr);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -84,5 +83,16 @@
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.signal-reason {
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.5;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.signal-reason-label {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user