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
| <template>
| <div class="monitor">
| <MonitorMenu :menu="currentMenu" @on-select-change="onMenuSelectChange"></MonitorMenu>
| <div class="panel" v-if="currentMenu && currentMenu.name">
| <MonitorPanel :menu="currentMenu" @close="onPanelClose"></MonitorPanel>
| </div>
| <MonitorSVG></MonitorSVG>
| </div>
| </template>
|
| <script>
| import MonitorMenu from "@/components/monitor/menu";
| import MonitorPanel from "@/components/monitor/panel";
| import MonitorSVG from "@/components/monitor/svg";
| export default {
| name: "Monitor",
| components: {
| MonitorMenu,
| MonitorPanel,
| MonitorSVG,
| },
| data() {
| return {
| currentMenu: {
| name: "agv",
| icon: "md-git-compare",
| title: "AGV",
| },
| };
| },
| methods: {
| onMenuSelectChange(menu) {
| this.currentMenu = menu;
| },
| onPanelClose() {
| this.currentMenu = {
| name: "",
| icon: "",
| title: "",
| };
| },
| },
| };
| </script>
|
| <style lang="less" scoped>
| @import "../less/monitor.less";
| .monitor {
| height: 100%;
| position: relative;
| .monitor-menu {
| position: absolute;
| z-index: @monitor-menu-z-index;
| }
| .panel {
| position: absolute;
| top: 0;
| left: calc(@monitor-menu-width + @monitor-panel-left-gap);
| width: @monitor-panel-width;
| height: 100%;
| background-color: #fff;
| box-shadow: 3px 3px 11px 0px rgba(0, 0, 0, 0.3);
| z-index: @monitor-panel-z-index;
| border-radius: 5px;
| }
| }
| </style>
|
|