iam-audit-dsc-center-div.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <a-row>
  3. <a-col :span="12">
  4. <!-- <a-tabs :default-active-key="activeKey" :class="$style.tabs">
  5. <a-tab-pane key="1" tab="项目总览">
  6. <div :class="$style.mainDiv">
  7. <iam-audit-onepie
  8. :key="key"
  9. :unid-id="selectUnidId"
  10. :plan-year="selectYear"
  11. ></iam-audit-onepie>
  12. </div>
  13. </a-tab-pane>
  14. <a-tab-pane key="2" tab="项目趋势分析" force-render>
  15. <div :class="$style.mainDiv">
  16. <iam-audit-twopie
  17. :key="key"
  18. :unid-id="selectUnidId"
  19. :plan-year="selectYear"
  20. ></iam-audit-twopie>
  21. </div>
  22. </a-tab-pane>
  23. </a-tabs> -->
  24. <div :class="$style.mainDiv">
  25. <iam-audit-onepie
  26. :key="key"
  27. :unid-id="selectUnidId"
  28. :plan-year="selectYear"
  29. ></iam-audit-onepie>
  30. </div>
  31. </a-col>
  32. <a-col :span="12">
  33. <a-tabs :default-active-key="activeKey" :class="$style.tabs">
  34. <a-tab-pane key="1" tab="审计发现统计">
  35. <div :class="$style.mainDiv">
  36. <iam-audit-threepie
  37. :key="key"
  38. :unid-id="selectUnidId"
  39. :plan-year="selectYear"
  40. ></iam-audit-threepie>
  41. </div>
  42. </a-tab-pane>
  43. <a-tab-pane key="2" tab="问题涉及金额" force-render>
  44. <div :class="$style.mainDiv">
  45. <iam-audit-fourpie
  46. :key="key"
  47. :unid-id="selectUnidId"
  48. :plan-year="selectYear"
  49. ></iam-audit-fourpie>
  50. </div>
  51. </a-tab-pane>
  52. </a-tabs>
  53. </a-col>
  54. </a-row>
  55. </template>
  56. <script>
  57. import components from './_import-components/iam-audit-dsc-center-div-import'
  58. export default {
  59. name: 'IamAuditDscCenterDiv',
  60. metaInfo: {
  61. title: 'IamAuditDscCenterDiv',
  62. },
  63. components,
  64. props: {
  65. /**
  66. * 统计的组织ID
  67. */
  68. unidId: {
  69. type: Array,
  70. default: () => {
  71. return []
  72. },
  73. },
  74. /**
  75. * 统计的年份
  76. */
  77. planYear: {
  78. type: String,
  79. default: null,
  80. },
  81. },
  82. data() {
  83. return {
  84. activeKey: '1',
  85. key: 0,
  86. }
  87. },
  88. computed: {
  89. // 因为props传值不会自动更新,使用计算值
  90. selectYear() {
  91. return this.planYear
  92. },
  93. // 因为props传值不会自动更新,使用计算值
  94. selectUnidId() {
  95. return this.unidId
  96. },
  97. },
  98. watch: {
  99. selectYear() {
  100. this.key++
  101. },
  102. selectUnidId() {
  103. this.key++
  104. },
  105. },
  106. created() {},
  107. methods: {},
  108. }
  109. </script>
  110. <style module lang="scss">
  111. @use '@/common/design' as *;
  112. .tabs {
  113. padding: 10px 25px;
  114. margin: 0 10px;
  115. background: #fff;
  116. border-radius: 10px;
  117. }
  118. .main-div {
  119. height: 320px;
  120. }
  121. .empty {
  122. padding-top: 80px;
  123. margin: 0;
  124. }
  125. </style>