haoxuan
2023-12-01 ac5ea4c47689788facb2471995621c720a06abc8
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<template>
  <div class="dashboard-layout">
    <div class="dashboard-title">智能驾驶舱</div>
    <div class="left">
      <div class="left-header-block">
        <slot name="leftBlock1"></slot>
      </div>
      <div class="left-bottom-block">
        <div class="left-bottom-left-block">
          <div class="left-bottom-top-block">
            <slot name="leftBlock2"></slot>
          </div>
          <div class="left-bottom-middle-block">
            <slot name="leftBlock3"></slot>
          </div>
          <div class="left-bottom-bottom-block">
            <slot name="leftBlock4"></slot>
          </div>
        </div>
        <div class="left-bottom-right-block">
          <div class="right-bottom-top-block">
            <slot name="leftBlock5"></slot>
          </div>
          <div class="right-bottom-bottom-block">
            <slot name="leftBlock6"></slot>
          </div>
        </div>
      </div>
    </div>
    <div class="right">
      <div class="right-bg">
        <div class="right-top-block">
          <slot name="rightBlock1"></slot>
        </div>
        <div class="right-middle-block">
          <slot name="rightBlock2"></slot>
        </div>
        <div class="right-bottom-block">
          <slot name="rightBlock3"></slot>
        </div>
      </div>
    </div>
  </div>
</template>
 
<script></script>
 
<style scoped lang="scss">
// 左侧区域宽
$leftWidth: 73%;
// 右侧区域宽
$rightWidth: 27%;
// 整体内边距
$layoutPadding: 12px;
// 上边固定高
$topBlockHeight: 100px;
// 左侧头部数据高度
$leftHeaderHeight: 8%;
// 左侧公共右边距
$leftMarginRight: 25px;
// 整体内容左边距
$leftMargin: 80px;
// 整体内容右边距
$rightMargin: 65px;
// 左侧布局块高度
$leftBlockHeight: calc(100vh - 245px);
// 右侧布局块高度
$rightBlockHeight: calc(100vh - 120px);
// 左下上边距
$leftBottomMarginTop: 40px;
// 左下左侧区域宽
$leftBottomLeftWidth: 37%;
// 左下右侧区域宽
$leftBottomRightWidth: 63%;
 
.dashboard-layout {
  background-image: url("/cockpit-bg.jpg");
  background-position-x: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100vh;
  width: 100vw;
  .dashboard-title {
    width: 100%;
    text-align: center;
    position: absolute;
    top: 10px;
    font-size: 32px;
    color: #01f5fe;
    font-weight: 700;
    font-family: "Arial Negreta", "Arial Normal", "Arial";
  }
  &.debug {
    & > div {
      border: 1px solid red;
      & > div {
        border: 1px solid red;
      }
    }
  }
}
 
.left {
  width: $leftWidth;
  margin-left: $leftMargin;
}
.right {
  width: $rightWidth;
  margin-right: $rightMargin;
}
 
.left,
.right {
  height: 100%;
  overflow: hidden;
}
 
.left-header-block {
  height: $leftHeaderHeight;
  margin-top: $topBlockHeight;
  padding-right: $leftMarginRight;
}
.left-bottom-block {
  margin-top: $leftBottomMarginTop;
  height: $leftBlockHeight;
  display: flex;
  .left-bottom-left-block {
    width: $leftBottomLeftWidth;
    height: 100%;
    .left-bottom-top-block {
      height: 41%;
    }
    .left-bottom-middle-block {
      height: 25%;
    }
    .left-bottom-bottom-block {
      height: 34%;
    }
  }
  .left-bottom-right-block {
    width: $leftBottomRightWidth;
    height: 100%;
    padding-right:20px;
    .right-bottom-top-block {
      height: 60%;
    }
    .right-bottom-bottom-block {
      height: 40%;
    }
  }
}
 
.right-bg {
  margin-top: $topBlockHeight;
  height: $rightBlockHeight;
}
.right-top-block {
  height: 30%;
}
.right-middle-block {
  height: 35%;
}
.right-bottom-block {
  height: 35%;
}
</style>