feat 删除测试代码
This commit is contained in:
@@ -1,197 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue'
|
||||
import { useDbStore } from '@/store/modules/db'
|
||||
import { useDeviceStore } from '@/store/modules/home'
|
||||
|
||||
const deviceStore = useDeviceStore()
|
||||
const dbStore = useDbStore()
|
||||
|
||||
onMounted(async () => {
|
||||
console.log('组件挂载时 初始化设备信息')
|
||||
deviceStore.initDevice()
|
||||
|
||||
await dbStore.loadProjects()
|
||||
console.log('projects:', dbStore.projects)
|
||||
|
||||
await dbStore.loadWorkRecords()
|
||||
console.log('workRecords:', dbStore.workRecords)
|
||||
|
||||
await dbStore.loadRtkTracks()
|
||||
console.log('rtkTracks:', dbStore.rtkTracks)
|
||||
|
||||
await dbStore.loadWarningRecords()
|
||||
console.log('warningRecords:', dbStore.warningRecords)
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view v-if="deviceStore.currentDevice" class="device-footer">
|
||||
<view class="device-info">
|
||||
<view class="device-main">
|
||||
<view class="device-icon">
|
||||
<wd-icon name="settings" size="20px" color="#3b82f6" />
|
||||
</view>
|
||||
<view class="device-detail">
|
||||
<text class="device-name">
|
||||
{{ deviceStore.currentDevice.brand }} {{ deviceStore.currentDevice.model }}
|
||||
</text>
|
||||
<text class="device-model">
|
||||
{{ deviceStore.osTypeName }} · {{ deviceStore.deviceTypeName }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="device-status">
|
||||
<view class="status-indicator status-online" />
|
||||
<text class="status-text">
|
||||
已连接
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="device-metrics">
|
||||
<view class="metric-item">
|
||||
<text class="metric-label">
|
||||
屏幕
|
||||
</text>
|
||||
<text class="metric-value">
|
||||
{{ deviceStore.currentDevice.windowWidth }} x {{ deviceStore.currentDevice.windowHeight }}
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<view class="metric-item">
|
||||
<text class="metric-label">
|
||||
平台
|
||||
</text>
|
||||
<text class="metric-value">
|
||||
{{ deviceStore.currentDevice.platform }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="device-id">
|
||||
<text class="id-label">
|
||||
设备ID:
|
||||
</text>
|
||||
<text class="id-value">
|
||||
{{ deviceStore.currentDevice.deviceId }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.device-footer {
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
padding: 16px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.device-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.device-main {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.device-icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
background: #eff6ff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.device-detail {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.device-name {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.device-model {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.device-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.status-indicator {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.status-online {
|
||||
background: #22c55e;
|
||||
}
|
||||
|
||||
.status-text {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.device-metrics {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.metric-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.metric-label {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
width: 35px;
|
||||
}
|
||||
|
||||
.metric-value {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.device-id {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin-top: 12px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.id-label {
|
||||
font-size: 11px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.id-value {
|
||||
font-size: 11px;
|
||||
color: #666;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user