haoxuan
2023-11-01 7c4cb1395a86458d436147304142de9dddd8aa1e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<template>
  <div class="dashboard-title">
    <div class="title-text">智能工作台 — {{ props?.deviceInfo?.currentDeviceID ?? '' }}</div>
    <div class="title-status">
      <div class="connection-info" @click="openSelectDeviceModal">
        <el-icon size="30" color="red">
          <AlertLightIcon></AlertLightIcon>
        </el-icon>
      </div>
      <div class="connection-status"></div>
    </div>
  </div>
</template>
<script setup lang="ts">
import type { Devices } from '@/api/device'
import AlertLightIcon from '@/components/icons/AlertLightIcon.vue'
import { ref } from 'vue'
 
export interface DashBoardTitleProps {
  deviceInfo: Devices
}
 
const props = defineProps<DashBoardTitleProps>()
 
const showModal = ref(false)
 
function openSelectDeviceModal() {
  showModal.value = true
}
</script>
 
<style scoped lang="scss">
.dashboard-title {
  position: relative;
}
.title-text {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
}
.title-status {
  position: absolute;
  top: 16px;
  right: 40px;
}
.connection-info {
  cursor: pointer;
}
</style>