index.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <div class="app-container">
  3. <el-tabs type="border-card"v-model="activeName" @tab-click="handleClick">
  4. <el-tab-pane label="待处理" name="first">
  5. <pending item="1" typename="" v-if="isFirst"></pending>
  6. </el-tab-pane>
  7. <el-tab-pane label="与我相关" name="second">
  8. <mine item="2" typename="" v-if="isSecond"></mine>
  9. </el-tab-pane>
  10. <el-tab-pane label="总数据" name="third">
  11. <all item="3" typename="" v-if="isThird"></all>
  12. </el-tab-pane>
  13. </el-tabs>
  14. </div>
  15. </template>
  16. <script>
  17. import All from '@/views/production/eoegapply/all/index.vue'
  18. import Mine from '@/views/production/eoegapply/mine/index.vue'
  19. import Pending from '@/views/production/eoegapply/pending/index.vue'
  20. export default {
  21. name: "EoegApply",
  22. components: { All, Mine, Pending },
  23. data() {
  24. return {
  25. activeName: 'first',
  26. isFirst: true,
  27. isSecond: false,
  28. isThird: false,
  29. }
  30. },
  31. methods: {
  32. handleClick(tab) {
  33. if (tab.name === 'first') {
  34. this.isFirst = true
  35. this.isSecond = false
  36. this.isThird = false
  37. } else if (tab.name === 'second') {
  38. this.isFirst = false
  39. this.isSecond = true
  40. this.isThird = false
  41. }else if (tab.name === 'third') {
  42. this.isFirst = false
  43. this.isSecond = false
  44. this.isThird = true
  45. }
  46. },
  47. }
  48. };
  49. </script>