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

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