index.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <div class="app-container" style="padding: 0 0 0 0">
  3. <el-tabs type="border-card"v-model="activeName" @tab-click="handleClick">
  4. <el-tab-pane label="永久MOC" name="first">
  5. <PermanentMoc item="1" typename="" v-if="isFirst"></PermanentMoc>
  6. </el-tab-pane>
  7. <el-tab-pane label="临时MOC" name="second">
  8. <TemporaryMoc item="2" typename="" v-if="isSecond"></TemporaryMoc>
  9. </el-tab-pane>
  10. <el-tab-pane label="带压消漏清单" name="third">
  11. <Aquifier item="3" typename="" v-if="isThird"></Aquifier>
  12. </el-tab-pane>
  13. <el-tab-pane label="临时设施、其它" name="fourth">
  14. <Facility item="4" typename="" v-if="isFourth"></Facility>
  15. </el-tab-pane>
  16. <el-tab-pane label="仪表参数修改" name="fifth">
  17. <Interlock item="5" typename="" v-if="isFifth"></Interlock>
  18. </el-tab-pane>
  19. <el-tab-pane label="汇总" name="sixth">
  20. <Summary item="6" typename="" v-if="isSixth"></Summary>
  21. </el-tab-pane>
  22. </el-tabs>
  23. </div>
  24. </template>
  25. <script>
  26. import PermanentMoc from '@/views/process/moc/permanentMoc/index.vue'
  27. import TemporaryMoc from '@/views/process/moc/temporaryMoc/index.vue'
  28. import Aquifier from '@/views/process/moc/aquifier/index.vue'
  29. import Facility from '@/views/process/moc/facility/index.vue'
  30. import Interlock from '@/views/process/moc/interlock/index.vue'
  31. import Summary from '@/views/process/moc/summary/index.vue'
  32. export default {
  33. name: "Moc",
  34. components: {
  35. PermanentMoc, TemporaryMoc, Aquifier, Facility, Interlock, Summary
  36. },
  37. data() {
  38. return {
  39. // 默认第一个Tab
  40. activeName: 'first',
  41. isFirst: true,
  42. isSecond: false,
  43. isThird: false,
  44. isFourth: false,
  45. isFifth: false,
  46. isSixth: false
  47. }
  48. },
  49. methods: {
  50. handleClick(tab) {
  51. if (tab.name === 'first') {
  52. this.isFirst = true
  53. this.isSecond = false
  54. this.isThird = false
  55. this.isFourth = false
  56. this.isFifth = false
  57. this.isSixth = false
  58. } else if (tab.name === 'second') {
  59. this.isFirst = false
  60. this.isSecond = true
  61. this.isThird = false
  62. this.isFourth = false
  63. this.isFifth = false
  64. this.isSixth = false
  65. }else if (tab.name === 'third') {
  66. this.isFirst = false
  67. this.isSecond = false
  68. this.isThird = true
  69. this.isFourth = false
  70. this.isFifth = false
  71. this.isSixth = false
  72. }else if (tab.name === 'fourth') {
  73. this.isFirst = false
  74. this.isSecond = false
  75. this.isThird = false
  76. this.isFourth = true
  77. this.isFifth = false
  78. this.isSixth = false
  79. }else if (tab.name === 'fifth') {
  80. this.isFirst = false
  81. this.isSecond = false
  82. this.isThird = false
  83. this.isFourth = false
  84. this.isFifth = true
  85. this.isSixth = false
  86. }else if (tab.name === 'sixth') {
  87. this.isFirst = false
  88. this.isSecond = false
  89. this.isThird = false
  90. this.isFourth = false
  91. this.isFifth = false
  92. this.isSixth = true
  93. }
  94. }
  95. }
  96. };
  97. </script>
  98. <style scoped>
  99. </style>