阅行客电子档案
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.

72 lines
1.9 KiB

2 years ago
  1. <template>
  2. <div>
  3. <ul class="tab-nav">
  4. <li :class="{ 'active-tab-nav': activeIndex == 0 }" @click="changeActiveTab(0)">已整理<i /></li>
  5. <li :class="{ 'active-tab-nav': activeIndex == 1 }" @click="changeActiveTab(1)">未整理<i /></li>
  6. <!-- 最右侧装饰img -->
  7. <span class="tab-right-img" />
  8. </ul>
  9. <CollectHeader :is-title-type="isTitleType" :selected-category="selectedCategory" />
  10. <component :is="comName" />
  11. <el-button v-if="selectedCategory.isType === 2 || selectedCategory.isType === 3" type="text" @click="openJuannei">打开卷内的Drawer</el-button>
  12. <el-button v-if="selectedCategory.isType === 5" type="text" @click="openJuannei">打开文件的Drawer</el-button>
  13. </div>
  14. </template>
  15. <script>
  16. import SortedModule from './sorted.vue'
  17. import UnSortedModule from './unsorted.vue'
  18. import CollectHeader from '../module/collectHeader.vue'
  19. export default {
  20. name: 'AnjuanContent',
  21. components: { SortedModule, UnSortedModule, CollectHeader },
  22. props: {
  23. data: {
  24. type: String,
  25. default: ''
  26. },
  27. selectedCategory: {
  28. type: Object,
  29. default: function() {
  30. return {}
  31. }
  32. }
  33. },
  34. data() {
  35. return {
  36. isTitleType: 3,
  37. activeIndex: 0
  38. }
  39. },
  40. computed: {
  41. comName: function() {
  42. if (this.activeIndex === 0) {
  43. return 'SortedModule'
  44. } else if (this.activeIndex === 1) {
  45. return 'UnSortedModule'
  46. }
  47. return 'SortedModule'
  48. }
  49. },
  50. created() {
  51. },
  52. mounted() {
  53. },
  54. methods: {
  55. openJuannei() {
  56. // this.$emit('openJuannei', '这是来自案卷的通知')
  57. if (this.selectedCategory.isType === 2) {
  58. this.$parent.$parent.$emit('openJuannei')
  59. } else {
  60. this.$parent.$emit('openJuannei')
  61. }
  62. },
  63. changeActiveTab(data) {
  64. this.activeIndex = data
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang='scss' scoped>
  70. </style>