CameraPreview.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <div>
  3. <h2> 相机预览 </h2>
  4. <div class="cameraMain">
  5. <div class="cameraTree">
  6. <CameraTree :data="data" v-if="data" />
  7. </div>
  8. <div class="cameraSettingWrapper">
  9. <div class="cameraView">
  10. <CameraViewSetting />
  11. </div>
  12. <div class="cameraParamsSettingWrapper">
  13. <div class="cameraParamsSetting">
  14. <CameraParams :detail="cameraParamsDetail" />
  15. </div>
  16. <div class="algorithmsSetting"> <AlgorithmsSetting /> </div>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. </template>
  22. <script lang="ts" setup>
  23. import { ref } from 'vue';
  24. import CameraTree from './components/CameraTree/CameraTree.vue';
  25. import CameraViewSetting from './components/CameraViewSetting/CameraViewSetting.vue';
  26. import AlgorithmsSetting from './components/AlgorithmsSetting/AlgorithmsSetting.vue';
  27. import useCameraTree from './hooks/useCameraTree';
  28. import CameraParams from './components/CameraParams/CameraParams.vue';
  29. const { data, loading } = useCameraTree();
  30. const cameraParamsDetail = ref({});
  31. </script>
  32. <style lang="scss" scoped>
  33. .cameraView {
  34. width: 800px;
  35. // height: 400px;
  36. // border: 1px solid #ccc;
  37. }
  38. .cameraParamsSetting {
  39. width: 350px;
  40. min-height: 300px;
  41. // border: 1px solid #ccc;
  42. }
  43. .cameraParamsSetting {
  44. width: 350px;
  45. min-height: 300px;
  46. // border: 1px solid #ccc;
  47. }
  48. .algorithmsSetting {
  49. flex: 1;
  50. border-left: 1px solid #ccc;
  51. padding-left: 20px;
  52. }
  53. .cameraMain {
  54. display: flex;
  55. background: #fff;
  56. }
  57. .cameraTree {
  58. width: 250px;
  59. height: 800px;
  60. border: 1px solid #ccc;
  61. }
  62. .cameraParamsSettingWrapper {
  63. display: flex;
  64. margin-top: 10px;
  65. }
  66. .algorithmsSetting {
  67. flex: 1;
  68. min-height: 300px;
  69. margin-left: 10px;
  70. }
  71. </style>