law-team-tree.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <a-card :class="[$style.treewrap, $style.ywlxtree]">
  3. <sd-group-tree
  4. :root-node="{ code: -1, name: '法律队伍', id: -1 }"
  5. @update:selectedKeys="handleTreeSelect"
  6. />
  7. </a-card>
  8. </template>
  9. <script>
  10. import components from './_import-components/law-team-tree-import'
  11. export default {
  12. name: 'LawTeamTree',
  13. components,
  14. data() {
  15. return {}
  16. },
  17. methods: {
  18. handleTreeSelect(key) {
  19. this.$emit('treeSelect', key)
  20. },
  21. },
  22. }
  23. </script>
  24. <style module lang="scss">
  25. @use '@/common/design' as *;
  26. .spin {
  27. width: 100%;
  28. line-height: 30;
  29. }
  30. .ywlxtree {
  31. :global(.ant-tree-title) {
  32. display: inline-block;
  33. width: 100%;
  34. overflow: hidden;
  35. text-overflow: ellipsis;
  36. white-space: nowrap;
  37. }
  38. :global(.ant-input-search) {
  39. margin: 8px 0;
  40. overflow: hidden;
  41. }
  42. .active {
  43. color: $primary-color;
  44. }
  45. :global(.ant-select) {
  46. width: 100%;
  47. overflow: hidden;
  48. }
  49. }
  50. .treewrap {
  51. position: relative;
  52. display: flex;
  53. flex-direction: column;
  54. width: 20%;
  55. min-height: 100%;
  56. margin-right: $padding-lg;
  57. transition: width 0.2s;
  58. .fold {
  59. position: absolute;
  60. top: calc(50% - 30px);
  61. right: -15px;
  62. z-index: 2;
  63. width: 15px;
  64. height: 75px;
  65. padding: 0;
  66. border-radius: 0 10px 10px 0;
  67. }
  68. :global(.ant-tree) {
  69. overflow: hidden;
  70. text-overflow: ellipsis;
  71. white-space: nowrap;
  72. }
  73. :global(.ant-card-body) {
  74. background: $white;
  75. }
  76. }
  77. .collapse {
  78. width: 0;
  79. :global(.ant-card-body) {
  80. background: transparent;
  81. :global(.ant-empty) {
  82. display: none;
  83. }
  84. }
  85. }
  86. </style>