index.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. 页面开发中……
  6. <!--<all item="1" typename="" v-if="isFirst"></all>-->
  7. </el-tab-pane>
  8. <el-tab-pane label="与我相关" name="second">
  9. 页面开发中……
  10. <!--<all item="2" typename="" v-if="isSecond"></all>-->
  11. </el-tab-pane>
  12. <el-tab-pane label="总数据" name="third">
  13. <all item="3" typename="" v-if="isThird"></all>
  14. </el-tab-pane>
  15. </el-tabs>
  16. </div>
  17. </template>
  18. <script>
  19. import All from '@/views/production/apply/all/index.vue'
  20. export default {
  21. name: "Apply",
  22. components: { All },
  23. data() {
  24. return {
  25. // 默认第一个Tab
  26. activeName: 'first',
  27. isFirst: true,
  28. isSecond: false,
  29. isThird: false,
  30. }
  31. },
  32. methods: {
  33. handleClick(tab) {
  34. if (tab.name === 'first') {
  35. this.isFirst = true
  36. this.isSecond = false
  37. this.isThird = false
  38. } else if (tab.name === 'second') {
  39. this.isFirst = false
  40. this.isSecond = true
  41. this.isThird = false
  42. }else if (tab.name === 'third') {
  43. this.isFirst = false
  44. this.isSecond = false
  45. this.isThird = true
  46. }else if (tab.name === 'fourth') {
  47. this.isFirst = false
  48. this.isSecond = false
  49. this.isThird = false
  50. }else if (tab.name === 'fifth') {
  51. this.isFirst = false
  52. this.isSecond = false
  53. this.isThird = false
  54. }else if (tab.name === 'sixth') {
  55. this.isFirst = false
  56. this.isSecond = false
  57. this.isThird = false
  58. }
  59. },
  60. }
  61. };
  62. </script>