智慧农业后台管理页面
guoshilong
2022-11-08 082613d446e29e4ec1c16bfaa52345106a498b23
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
<template>
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <!-- 种植记录 -->
      <el-tab-pane label="种养品种" name="tab1">
        <farmplant
        ></farmplant>
      </el-tab-pane>
      <!-- 农事记录 -->
      <el-tab-pane label="农事记录" name="tab2">
        <farming
        ></farming>
      </el-tab-pane>
      <!-- 采收记录 -->
      <el-tab-pane label="采收记录" name="tab3">
        <recovery 
        ></recovery>
      </el-tab-pane>
    </el-tabs>
</template>
 
<script>
import farmplant from "@/views/farmplant/farmplant.vue";
import farming from "@/views/farm/farmingrecord.vue";
import recovery from "@/views/recovery/recovery.vue";
import { mapGetters } from "vuex";
 
export default {
  components: {
    farmplant,
    farming,
    recovery
  },
  data() {
    return {
      farmId:"",
      type:"",
      activeName: "tab1",
    };
  },
  computed: {
    ...mapGetters(["userInfo", "permission"]),
  },
  created(){
    this.activeName = this.$route.query.activeName;
    if(this.activeName=="tab2"){
      this.type = this.$route.query.type;
      console.log(this.type,3333333);
    }
    
  },
  methods: {
    handleClick(data){
      this.activeName = data.name;
    },
  },
  watch: {},
};
</script>
 
<style lang="scss" scoped>
</style>