【前端】智能库房综合管理系统前端项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
2.5 KiB

3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div class="app-container lend-container">
  3. <!-- 借阅列表 -->
  4. <!-- 借阅管理tab -->
  5. <div class="tab-content">
  6. <span class="right-top-line" />
  7. <span class="left-bottom-line" />
  8. <ul class="tab-nav">
  9. <li
  10. :class="{ 'active-tab-nav': activeIndex == 0 }"
  11. @click="changeActiveTab(0)"
  12. >
  13. 待借档案<i />
  14. </li>
  15. <li
  16. :class="{ 'active-tab-nav': activeIndex == 1 }"
  17. @click="changeActiveTab(1)"
  18. >
  19. 借出确认<i />
  20. </li>
  21. <li
  22. :class="{ 'active-tab-nav': activeIndex == 2 }"
  23. @click="changeActiveTab(2)"
  24. >
  25. 归还档案<i />
  26. </li>
  27. <li
  28. :class="{ 'active-tab-nav': activeIndex == 3 }"
  29. @click="changeActiveTab(3)"
  30. >
  31. 借阅查询<i />
  32. </li>
  33. <li
  34. :class="{ 'active-tab-nav': activeIndex == 4 }"
  35. @click="changeActiveTab(4)"
  36. >
  37. 借阅者管理<i />
  38. </li>
  39. <!-- 最右侧装饰img -->
  40. <span class="tab-right-img" />
  41. </ul>
  42. <component :is="comName" :record-form-visible="recordFormVisible" @callBack="callBack" />
  43. </div>
  44. </div>
  45. </template>
  46. <script>
  47. import toLend from './toLend/index.vue'
  48. import lendConfirm from './lendConfirm/index.vue'
  49. import returnArchives from './returnArchives/index.vue'
  50. import lendQuery from './lendQuery/index.vue'
  51. import borrowerManage from './borrowerManage/index.vue'
  52. export default {
  53. name: 'BorrowManage',
  54. components: {
  55. toLend,
  56. lendConfirm,
  57. returnArchives,
  58. lendQuery,
  59. borrowerManage
  60. },
  61. data() {
  62. return {
  63. activeIndex: 0
  64. // recordFormVisible:false
  65. }
  66. },
  67. computed: {
  68. comName: function() {
  69. if (this.activeIndex === 0) {
  70. return 'toLend'
  71. } else if (this.activeIndex === 1) {
  72. return 'lendConfirm'
  73. } else if (this.activeIndex === 2) {
  74. return 'returnArchives'
  75. } else if (this.activeIndex === 3) {
  76. return 'lendQuery'
  77. } else if (this.activeIndex === 4) {
  78. return 'borrowerManage'
  79. }
  80. return 'toLend'
  81. }
  82. },
  83. methods: {
  84. changeActiveTab(data) {
  85. this.activeIndex = data
  86. },
  87. // 重新登记
  88. callBack(val) {
  89. console.log(val, '-------------------')
  90. this.activeIndex = val.index
  91. }
  92. }
  93. }
  94. </script>
  95. <style lang="scss" scoped>
  96. .lend-container{
  97. .tab-content{
  98. position: relative;
  99. margin-top: 61px;
  100. border: 1px solid #113d72;
  101. }
  102. }
  103. </style>