audit-advanced-group.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <div :class="$style.maingroupdiv">
  3. <div :class="$style.groupstyle">
  4. <span :class="$style.expandicon" @click="changeexpand">
  5. <a-icon :type="expanded ? 'minus-square' : 'plus-square'" :theme="'filled'" />
  6. {{ groupLabel }}
  7. </span>
  8. </div>
  9. <div :class="$style.expandCount">
  10. <span>{{ countLabel }}</span>
  11. </div>
  12. <div v-if="expanded">
  13. <slot></slot>
  14. </div>
  15. </div>
  16. </template>
  17. <script>
  18. import components from './_import-components/audit-advanced-group-import'
  19. export default {
  20. name: 'AuditAdvancedGroup',
  21. metaInfo: {
  22. title: 'AuditAdvancedGroup',
  23. },
  24. components,
  25. props: {
  26. /**
  27. * 表单分组组件展示隐藏
  28. * true 展示
  29. * false 隐藏
  30. */
  31. expand: {
  32. type: Boolean,
  33. default: true,
  34. },
  35. /**
  36. * 表单分组组件名
  37. */
  38. groupLabel: {
  39. type: String,
  40. default: '项目信息',
  41. },
  42. /**
  43. /**
  44. * 表单分组组件名右侧统计内容
  45. */
  46. countLabel: {
  47. type: String,
  48. default: '',
  49. },
  50. /**
  51. * 表单分组标志位名
  52. */
  53. expandStr: {
  54. type: String,
  55. default: 'expand',
  56. },
  57. xmchildtable: {
  58. type: String,
  59. default: '',
  60. },
  61. },
  62. data() {
  63. return {
  64. expanded: true,
  65. }
  66. },
  67. methods: {
  68. changeexpand() {
  69. this.expanded = !this.expanded
  70. this.$emit('changedClick', this.expandStr)
  71. },
  72. },
  73. }
  74. </script>
  75. <style module lang="scss">
  76. @use '@/common/design' as *;
  77. .expandicon {
  78. // color: #0b75f3;#40a9ff
  79. // color: rgba(0, 0, 0, 0.85);
  80. color: #40a9ff;
  81. line-height: 22px;
  82. cursor: pointer;
  83. }
  84. .maingroupdiv {
  85. position: relative;
  86. .groupstyle {
  87. float: left;
  88. position: relative;
  89. z-index: 11;
  90. }
  91. .expandCount {
  92. // float: right;
  93. position: absolute;
  94. top: 0;
  95. right: 0;
  96. }
  97. }
  98. </style>