home.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <view class="content">
  3. <view class="top"></view>
  4. <view>
  5. <view class="row">
  6. <view class="item schedule" @click="schedule">
  7. <view>远程调度</view>
  8. <view class="en">Remote Scheduling</view>
  9. </view>
  10. <view class="item car" @click="carManager">
  11. <view>车辆信息管理</view>
  12. <view class="en">Warehouse Inspection</view>
  13. </view>
  14. </view>
  15. <view class="row">
  16. <view class="item live" @click="live">
  17. <view>实时联动</view>
  18. <view class="en">Real Time Linkage</view>
  19. </view>
  20. <view class="item monitor" @click="monitor">
  21. <view>车辆动态监测</view>
  22. <view class="en">Dynamic Monitoring</view>
  23. </view>
  24. </view>
  25. </view>
  26. <tabbar></tabbar>
  27. </view>
  28. </template>
  29. <script>
  30. import { HOME_INDEX, CAR_INDEX, MONITOR_INDEX, LIVE_INDEX } from '@/config/constants'
  31. import tabbar from '@/pages/components/tabbar.vue'
  32. export default {
  33. components: {tabbar},
  34. data() {
  35. return {
  36. }
  37. },
  38. methods: {
  39. userType() {
  40. return getApp().globalData.userType
  41. },
  42. monitor() {
  43. getApp().globalData.tabIndex = MONITOR_INDEX
  44. uni.navigateTo({
  45. url: '/pages/monitor/monitor'
  46. })
  47. },
  48. schedule() {
  49. uni.navigateTo({
  50. url: '/pages/schedule/schedule'
  51. })
  52. },
  53. carManager() {
  54. getApp().globalData.tabIndex = CAR_INDEX
  55. uni.navigateTo({
  56. url: '/pages/carManager/carManager'
  57. })
  58. },
  59. live() {
  60. getApp().globalData.tabIndex = LIVE_INDEX
  61. uni.navigateTo({
  62. url: '/pages/video/video'
  63. })
  64. }
  65. }
  66. }
  67. </script>
  68. <style lang="scss">
  69. .top {
  70. background: url('@/static/top.jpg');
  71. background-size: 100% 100%;
  72. height: 30vh;
  73. display: flex;
  74. flex-direction: column;
  75. }
  76. .row {
  77. flex-grow: 1;
  78. display: flex;
  79. flex-direction: row;
  80. justify-content: space-around;
  81. flex: 1;
  82. .item {
  83. width: 100%;
  84. height: 100px;
  85. margin: 10px 5px 5px 5px;
  86. font-size: px;
  87. box-sizing: border-box;
  88. padding: 25px 10px;
  89. .en {
  90. font-size: 10px;
  91. }
  92. }
  93. .schedule {
  94. background: url('@/static/schedule.png') no-repeat;
  95. background-size: 100% 100%;
  96. color: #3387bf;
  97. }
  98. .car {
  99. background: url('@/static/car.png') no-repeat;
  100. background-size: 100% 100%;
  101. color: #455cb8;
  102. }
  103. .live {
  104. background: url('@/static/live.png') no-repeat;
  105. background-size: 100% 100%;
  106. color: #e17f64;
  107. }
  108. .monitor {
  109. background: url('@/static/monitor.png') no-repeat;
  110. background-size: 100% 100%;
  111. color: #00c090;
  112. }
  113. }
  114. </style>