Summary.vue 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <script setup lang="ts">
  2. import {onMounted, reactive, ref} from "vue";
  3. import ProjectExplorer from "./components/project-explorer/ProjectExplorer.vue";
  4. import ToolBar from "./components/tool-bar/ToolBar.vue";
  5. import CostTable from "./components/cost-table/CostTable.vue";
  6. import BottomTabs from "./components/bottom-tabs/BottomTabs.vue";
  7. import StdBill from "./components/std-bill/StdBill.vue";
  8. const projectExplorerSize = ref(60)
  9. const mainContentSize = ref(300)
  10. const mainLeftSize = ref(150)
  11. const mainRightSize = ref(50)
  12. const mainLeftTopSize = ref(300)
  13. const mainLeftBottomSize = ref(150)
  14. const handleProjectExplorerSize = (size: number) => {
  15. projectExplorerSize.value = size
  16. }
  17. const handleMainContentSize = (size: number) => {
  18. mainContentSize.value = size
  19. }
  20. const handleMainLeftSize = (size: number) => {
  21. mainLeftSize.value = size
  22. }
  23. const handleMainRightSize = (size: number) => {
  24. mainRightSize.value = size
  25. }
  26. const handleMainLeftTopSize = (size: number) => {
  27. mainLeftTopSize.value = size
  28. }
  29. const handleMainLeftBottomSize = (size: number) => {
  30. mainLeftBottomSize.value = size
  31. }
  32. </script>
  33. <template>
  34. <article class="summary-page">
  35. <resizable-layout>
  36. <resizable-layout-item :weight="projectExplorerSize" :min-width="200" @resize="handleProjectExplorerSize">
  37. <!-- 左侧项目结构浏览器 -->
  38. <project-explorer/>
  39. </resizable-layout-item>
  40. <resizable-layout-item :weight="mainContentSize" :min-width="400" @resize="handleMainContentSize">
  41. <!-- 工具栏 -->
  42. <tool-bar/>
  43. <resizable-layout style="height: calc(100% - 41px)">
  44. <resizable-layout-item :weight="mainLeftSize" :min-width="150" @resize="handleMainLeftSize">
  45. <resizable-layout direction="vertical">
  46. <resizable-layout-item :weight="mainLeftTopSize" :min-width="400" @resize="handleMainLeftTopSize">
  47. <!-- 造价书表格 -->
  48. <cost-table/>
  49. </resizable-layout-item>
  50. <resizable-layout-item :weight="mainLeftBottomSize" :min-width="400" @resize="handleMainLeftBottomSize">
  51. <!-- 底部 tabs -->
  52. <bottom-tabs/>
  53. </resizable-layout-item>
  54. </resizable-layout>
  55. </resizable-layout-item>
  56. <!-- 右侧布局:标准清单 -->
  57. <resizable-layout-item :weight="mainRightSize" :min-width="150" @resize="handleMainRightSize">
  58. <std-bill/>
  59. </resizable-layout-item>
  60. </resizable-layout>
  61. </resizable-layout-item>
  62. </resizable-layout>
  63. </article>
  64. </template>
  65. <style lang="scss" src="./style.scss" scoped></style>