index.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <view class="index">
  3. <view class="index-header">
  4. <view class="index-header-box">
  5. <view class="index-header-box-1">
  6. <view class="left">
  7. <text>欢迎你!{{ userInfo.nickname }}</text>
  8. </view>
  9. <view class="right">
  10. <u-icon size="21" name="../../static/icons/logout-icon.svg" @click="logout"></u-icon>
  11. </view>
  12. </view>
  13. <view class="index-header-box-2">
  14. <text>普定智慧停车<br />运营中心</text>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="index-main">
  19. <view class="index-main-menu">
  20. <!-- 数据概览 -->
  21. <view class="index-main-menu-1">
  22. <view class="menu-item" v-for="(item, index) in analysisMenuList" :key="index" @click="jumpPage(item.url)">
  23. <view class="menu-item-icon">
  24. <u-icon size="48" :name="item.icon"></u-icon>
  25. </view>
  26. <view class="menu-item-name">
  27. <text>{{ item.name }}</text>
  28. </view>
  29. </view>
  30. </view>
  31. <!-- 订单管理 -->
  32. <view class="index-main-menu-2">
  33. <view class="index-main-menu-title">
  34. <text>订单管理</text>
  35. </view>
  36. <view class="menu">
  37. <view class="menu-item" v-for="(item, index) in orderMenuList" :key="index" @click="jumpPage(item.url)">
  38. <view class="menu-item-icon" :style="{ width: item.width || '30px' }">
  39. <u--image :src="item.icon" :width="item.width || '30px'"
  40. :height="item.height || '30px'"></u--image>
  41. </view>
  42. <view class="menu-item-name">
  43. <text>{{ item.name }}</text>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. <!-- 巡检管理 -->
  49. <view class="index-main-menu-2">
  50. <view class="index-main-menu-title">
  51. <text>巡检管理</text>
  52. </view>
  53. <view class="menu">
  54. <view class="menu-item" v-for="(item, index) in patrolMenuList" :key="index" @click="jumpPage(item.url)">
  55. <view class="menu-item-icon" :style="{ width: item.width || '30px' }">
  56. <u--image :src="item.icon" :width="item.width || '30px'"
  57. :height="item.height || '30px'"></u--image>
  58. </view>
  59. <view class="menu-item-name">
  60. <text>{{ item.name }}</text>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. export default {
  71. data() {
  72. return {
  73. userInfo: {
  74. nickname: 'XXX'
  75. },
  76. analysisMenuList: [{
  77. icon: require('@/static/icons/today-overview-icon.svg'),
  78. name: '今日概况',
  79. url: 'pages/dataOverview/todayOverview/todayOverview'
  80. },
  81. {
  82. icon: require('@/static/icons/operational-analysis-icon.svg'),
  83. name: '运营分析',
  84. url: 'pages/dataOverview/operationalAnalysis/operationalAnalysis'
  85. },
  86. {
  87. icon: require('@/static/icons/statistical-report-icon.svg'),
  88. name: '统计报表',
  89. url: 'pages/dataOverview/statisticalReport/statisticalReport'
  90. }
  91. ],
  92. // 订单管理
  93. orderMenuList: [{
  94. icon: require('@/static/icons/parking-record-icon.svg'),
  95. name: '停车记录',
  96. url: 'pages/orderManagement/parkingRecord/parkingRecord',
  97. width: '28px'
  98. },
  99. {
  100. icon: require('@/static/icons/arrearage-record-icon.svg'),
  101. name: '欠费记录',
  102. url: 'pages/orderManagement/arrearageRecord/arrearageRecord'
  103. },
  104. {
  105. icon: require('@/static/icons/collection-record-icon.svg'),
  106. name: '收款记录',
  107. url: 'pages/orderManagement/collectionRecord/collectionRecord'
  108. },
  109. {
  110. icon: require('@/static/icons/fee-evasion-record-icon.svg'),
  111. name: '逃费记录',
  112. url: 'pages/orderManagement/feeEvasionRecord/feeEvasionRecord',
  113. width: '33px',
  114. height: '26px'
  115. },
  116. {
  117. icon: require('@/static/icons/void-record-icon.svg'),
  118. name: '作废记录',
  119. url: 'pages/orderManagement/voidRecord/voidRecord',
  120. height: '31px'
  121. },
  122. {
  123. icon: require('@/static/icons/recovery-record-icon.svg'),
  124. name: '追缴记录',
  125. url: 'pages/orderManagement/recoveryRecord/recoveryRecord',
  126. height: '32px'
  127. }
  128. ],
  129. // 巡检管理
  130. patrolMenuList: [{
  131. icon: require('@/static/icons/patrol-manage-icon.svg'),
  132. name: '巡检记录',
  133. url: 'pages/patrolManagement/patrolRecord/patrolRecord',
  134. width: '29px',
  135. height: '31px'
  136. },
  137. {
  138. icon: require('@/static/icons/device-error-records-icon.svg'),
  139. name: '设备异常记录',
  140. url: 'pages/patrolManagement/deviceAbnormalRecords/deviceAbnormalRecords',
  141. width: '33px',
  142. height: '29px'
  143. }
  144. ]
  145. }
  146. },
  147. onLoad() {
  148. },
  149. methods: {
  150. /**
  151. * 登出操作
  152. */
  153. logout() {
  154. uni.showModal({
  155. title: '提示',
  156. content: '你确认退出登录?',
  157. success: (res) => {
  158. if (res.confirm) {
  159. this.jumpPage('pages/login/login')
  160. }
  161. }
  162. });
  163. },
  164. /**
  165. * 跳转页面
  166. * @param { String } url
  167. * @param { Object } params
  168. */
  169. jumpPage(url, params) {
  170. uni.$u.route({
  171. url,
  172. params
  173. })
  174. }
  175. }
  176. }
  177. </script>
  178. <style lang="scss">
  179. page {
  180. background-color: #EFEFEF;
  181. }
  182. </style>
  183. <style lang="scss" scoped>
  184. @import './index.scss';
  185. </style>