| | |
| | | <template> |
| | | <div class="dashboard-title"> |
| | | <div class="title-text">智能工作台 — {{ props?.deviceInfo?.currentDeviceID ?? '' }}</div> |
| | | <div class="title-text">智能工作台 — {{ deviceStore?.devices?.currentDeviceID ?? '' }}</div> |
| | | <div class="title-status"> |
| | | <div class="connection-info" @click="openSelectDeviceModal"> |
| | | <el-icon size="30" color="red"> |
| | |
| | | <div class="connection-status"></div> |
| | | </div> |
| | | </div> |
| | | |
| | | <TroubleTrackerModal v-model="showModal"></TroubleTrackerModal> |
| | | </template> |
| | | <script setup lang="ts"> |
| | | import type { Devices } from '@/api/device' |
| | | import AlertLightIcon from '@/components/icons/AlertLightIcon.vue' |
| | | import { ref } from 'vue' |
| | | import { useDevicesStore } from '@/stores/devices' |
| | | import TroubleTrackerModal from '@/views/dashboard/components/TroubleTrackerModal.vue' |
| | | |
| | | export interface DashBoardTitleProps { |
| | | deviceInfo: Devices |
| | | // deviceInfo: Devices |
| | | } |
| | | |
| | | const props = defineProps<DashBoardTitleProps>() |
| | |
| | | function openSelectDeviceModal() { |
| | | showModal.value = true |
| | | } |
| | | |
| | | const deviceStore = useDevicesStore() |
| | | |
| | | deviceStore.getDevicesInfo() |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |