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
| <!--
| * @Author: shuishen 1109946754@qq.com
| * @Date: 2024-09-09 11:40:40
| * @LastEditors: shuishen 1109946754@qq.com
| * @LastEditTime: 2024-09-09 12:02:50
| * @FilePath: \drone-web-manage\src\views\device\index.vue
| * @Description:
| *
| * Copyright (c) 2024 by shuishen, All Rights Reserved.
| -->
| <template>
| <basic-container>
| <el-tabs v-model="activeName" @tab-click="handleClick">
| <el-tab-pane label="机场" name="1">
| <airport ref="airport" />
| </el-tab-pane>
| <el-tab-pane label="飞行器" name="2">
| <fly ref="fly" />
| </el-tab-pane>
| </el-tabs>
| </basic-container>
| </template>
|
| <script>
| import { mapGetters } from 'vuex';
| import airport from './airport.vue';
| import fly from './fly.vue';
| export default {
| components: { airport, fly },
| data() {
| return {
| activeName: '1',
| form: {},
| query: {},
| loading: true,
| data: [],
| };
| },
| computed: {
| ...mapGetters(['permission']),
| permissionList() {
| return {};
| },
| ids() {
| let ids = [];
| this.selectionList.forEach(ele => {
| ids.push(ele.id);
| });
| return ids.join(',');
| },
| },
| created(){
| // 默认打开机场页面
| },
| methods: {
| handleClick(tab, event) {
| if (tab.index == 1) {
| this.$refs.fly.init();
| }
| if (tab.index == 0) {
| this.$refs.airport.init();
| }
| },
| },
| };
| </script>
|
| <style></style>
|
|