bottom.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <section
  3. :class="['layout-bottom', isShowBottom ? 'layout-bottom-all' : 'layout-bottom-hidden']"
  4. >
  5. <CapitalInfo class="capital-info-container"></CapitalInfo>
  6. <main>
  7. <firstMenu :list="orderList" :value="'title'" @selectMenu="selectMenu">
  8. <div class="conditionIcon icon iconfont icon-shouqi" @click="handleShowBottom"></div>
  9. </firstMenu>
  10. <div v-show="isShowBottom">
  11. <component :is="componentId" v-if="componentId"></component>
  12. </div>
  13. </main>
  14. </section>
  15. </template>
  16. <script lang="ts">
  17. import { defineAsyncComponent, defineComponent, ref } from 'vue';
  18. import CapitalInfo from '@/common/components/capitalInfo/index.vue';
  19. import firstMenu from '@/common/components/firstMenu/index.vue';
  20. import thirdMenu from '@/common/components/thirdMenu/index.vue';
  21. import quoteTable from '@/common/components/quoteTable/index.vue';
  22. import { OperationTabMenu } from '@/services/go/commonService/interface';
  23. import { handleOrderData } from '@/common/setup/order/orderData';
  24. import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
  25. import { handleShowBottom, getShowBottomValue } from '@/common/config/constrolBottom';
  26. export default defineComponent({
  27. name: 'layout-top',
  28. components: {
  29. CapitalInfo,
  30. firstMenu,
  31. quoteTable,
  32. thirdMenu,
  33. [enumOrderComponents.spot_warrant]: defineAsyncComponent(() => import('@/views/order/spot_warran/index.vue')),
  34. [enumOrderComponents.funding_information]: defineAsyncComponent(() => import('@/views/order/funding_information/index.vue')),
  35. [enumOrderComponents.performance_information]: defineAsyncComponent(() => import('@/views/order/performance_information/index.vue')),
  36. [enumOrderComponents.pre_sale_warehouse_receipt]: defineAsyncComponent(() => import('@/views/order/pre_sale_warehouse_receipt/index.vue')),
  37. },
  38. setup() {
  39. const { orderList, componentId } = handleOrderData();
  40. // 切换组件
  41. function selectMenu(value: OperationTabMenu) {
  42. componentId.value = value.code as enumOrderComponents;
  43. }
  44. return {
  45. selectMenu,
  46. componentId,
  47. orderList,
  48. isShowBottom: getShowBottomValue(),
  49. getShowBottomValue,
  50. handleShowBottom,
  51. };
  52. },
  53. });
  54. </script>
  55. <style lang="less">
  56. .layout-bottom-all {
  57. height: 330px;
  58. }
  59. .layout-bottom-hidden {
  60. height: 40px;
  61. }
  62. .layout-bottom {
  63. display: flex;
  64. width: 100%;
  65. transition: height 0.5s;
  66. overflow: hidden;
  67. .capital-info-container {
  68. width: 180px;
  69. border-right: 1px solid @m-black2;
  70. }
  71. main {
  72. max-width: calc(100% - 180px);
  73. flex: 1;
  74. .flex;
  75. flex-direction: column;
  76. background: rgb(14, 14, 15);
  77. position: relative;
  78. .conditionIcon {
  79. font-size: 16px;
  80. color: @m-grey1;
  81. width: 16px;
  82. cursor: pointer;
  83. height: 40px;
  84. line-height: 40px;
  85. margin-right: 10px;
  86. &:hover {
  87. color: rgba(@m-grey1, 0.8);
  88. }
  89. }
  90. }
  91. }
  92. </style>