haoxuan
2023-11-03 6b027c18660b828ec7b57ad0e3f4ffca9f4d14d1
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<template>
  <div class="device-number-info">
    <div class="device-l">
      <div class="device-t">本机设备编码</div>
      <div class="device-b">
        <div class="device-info">
          {{ deviceInfo?.systemDeviceID }}
        </div>
      </div>
    </div>
    <div class="device-r">
      <div class="device-t">云端设备编码</div>
      <div class="device-b">
        <div v-for="(item, index) in deviceInfo?.deviceIDList" :key="index" class="device-info">
          {{ item }}
        </div>
      </div>
    </div>
  </div>
</template>
<script setup lang="ts">
import { useDevicesStore } from '@/stores/devices'
import { storeToRefs } from 'pinia'
 
const deviceStore = useDevicesStore()
const { deviceInfo } = storeToRefs(deviceStore)
</script>
 
<style scoped lang="scss">
$status-default: #2c5dbb82;
$status-running: #00ff00f0;
$status-ready: #0059ffd0;
$status-border: #ffffff21;
$status-dark-font: #efefef;
$status-off: red;
.device-number-info {
  width: 100%;
  height: 180px;
  margin-top: 20px;
  color: #fff;
  overflow: hidden;
  float: left;
  text-align: center;
  font-size: 12px;
  background: $status-default;
  border: 1px solid $status-border;
  box-sizing: border-box;
  border-radius: 4px;
  padding: 5px 20px;
  .device-l {
    width: 120px;
    float: left;
  }
  .device-r {
    width: calc(100% - 130px);
    float: right;
  }
  .device-t {
    text-align: left;
    height: 25px;
    line-height: 25px;
  }
  .device-b {
    width: 100%;
    height: calc(100% - 35px);
    overflow: hidden;
  }
  .device-info {
    padding: 0px 6px;
    font-size: 12px;
    line-height: 20px;
    background: $status-ready;
    color: #fff;
    border-radius: 4px;
    float: left;
    margin-right: 5px;
    margin-top: 5px;
  }
}
</style>