sceneLibraryManagement.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <div>
  3. <toolbarTab
  4. :isConnect="true"
  5. position="top"
  6. :subPageActiveName="subPageActiveName"
  7. :toolbarItem="subPageList"
  8. @toolbarClick="toolsControl"
  9. >
  10. </toolbarTab>
  11. <naturalDrivingScene
  12. v-show="subPageActiveName == 1"
  13. >
  14. </naturalDrivingScene>
  15. <standardRegulationSimulationScene
  16. v-show="subPageActiveName == 2"
  17. >
  18. </standardRegulationSimulationScene>
  19. <trafficAccidentSimulationScene
  20. v-show="subPageActiveName == 3"
  21. >
  22. </trafficAccidentSimulationScene>
  23. <generalizationScene
  24. v-show="subPageActiveName == 4"
  25. ></generalizationScene>
  26. </div>
  27. </template>
  28. <script>
  29. import toolbarTab from "@/components/toolbar/toolbarTab";
  30. import naturalDrivingScene from "./naturalDrivingScene"
  31. import standardRegulationSimulationScene from "./standardRegulationSimulationScene"
  32. import trafficAccidentSimulationScene from "./trafficAccidentSimulationScene"
  33. import generalizationScene from "./generalizationScene"
  34. export default{
  35. name: "sceneLibraryManagement",
  36. components: { toolbarTab, naturalDrivingScene, standardRegulationSimulationScene, trafficAccidentSimulationScene, generalizationScene},
  37. data() {
  38. return {
  39. subPageActiveName:1,
  40. };
  41. },
  42. computed: {
  43. subPageList(){
  44. return [
  45. {
  46. type: "primary",
  47. plain: true,
  48. title: "自然驾驶场景",
  49. disabled: false,
  50. api: "",
  51. fromId: 1,
  52. },
  53. {
  54. type: "primary",
  55. plain: true,
  56. title: "标准法规仿真场景",
  57. disabled: false,
  58. api: "",
  59. fromId: 2,
  60. },
  61. {
  62. type: "primary",
  63. plain: true,
  64. title: "交通事故仿真场景",
  65. disabled: false,
  66. api: "",
  67. fromId: 3,
  68. },
  69. {
  70. type: "primary",
  71. plain: true,
  72. title: "泛化场景",
  73. disabled: false,
  74. api: "",
  75. fromId: 4,
  76. },
  77. ]
  78. }
  79. },
  80. methods: {
  81. toolsControl(item){
  82. this.subPageActiveName = item.fromId;
  83. }
  84. },
  85. }
  86. </script>
  87. <style scoped lang="less">
  88. .tabsBox {
  89. position: relative;
  90. overflow: hidden;
  91. .el-button {
  92. position: absolute;
  93. right: 40px;
  94. top: 45px;
  95. }
  96. }
  97. .myTabsBox{
  98. min-height:99px;
  99. }
  100. /deep/ .el-tabs__nav .el-tabs__item{
  101. width:auto;
  102. padding:0 10px;
  103. }
  104. </style>