index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <view class="container_box">
  3. <u-navbar height="40px" title=" " bgColor="transparent">
  4. <view class="u-nav-slot btn-left" slot="left" @click="meunClick">
  5. <image src="@/static/image/home/bulletpoint.png" mode=""></image>
  6. </view>
  7. <view class="u-nav-slot btn-right" slot="right" @click="noticeClick">
  8. <image src="@/static/image/home/notice-icon.png" mode=""></image>
  9. <u-badge type="error" :isDot="true" :show="noticeShow" :absolute="true" :offset="[-2,1]"></u-badge>
  10. </view>
  11. </u-navbar>
  12. <view class="container_main">
  13. <view class="header-box">
  14. <image src="@/static/image/home/home-top-img.png" mode=""></image>
  15. </view>
  16. <view class="container_cont">
  17. <view class="operate-item" v-for="(item,i) in operateList" :key="i" @click="operateClick(item)">
  18. <view class="operate-img">
  19. <image :src="item.src" mode=""></image>
  20. <u-badge type="error" absolute max="99" :value="item.num" :offset="[-5,-5]"></u-badge>
  21. </view>
  22. <view class="operate-text">{{item.text}}</view>
  23. </view>
  24. </view>
  25. </view>
  26. <!-- 菜单弹框 -->
  27. <use-pop :userInfo="userInfo" v-model="meunShow" @close="meunShow = false"></use-pop>
  28. </view>
  29. </template>
  30. <script>
  31. import usePop from './components/use-pop.vue'
  32. const Base64 = require('js-base64').Base64
  33. import {
  34. bannerList
  35. } from '@/common/request/apis/index'
  36. import {
  37. mapGetters
  38. } from 'vuex'
  39. export default {
  40. components:{
  41. usePop
  42. },
  43. data() {
  44. return {
  45. operateList:[
  46. {
  47. src:require('@/static/image/home/icon-jhrw.png'),
  48. text:'拣货任务',
  49. num:5,
  50. url:'/pages/picking-task/index'
  51. },
  52. {
  53. src:require('@/static/image/home/icon-cgrk.png'),
  54. text:'采购入库',
  55. num:5,
  56. url:''
  57. },
  58. {
  59. src:require('@/static/image/home/icon-chcx.png'),
  60. text:'存货查询',
  61. num:0,
  62. url:'/pages/inventory-inquiry/index'
  63. },
  64. {
  65. src:require('@/static/image/home/icon-pdrw.png'),
  66. text:'盘点任务',
  67. num:0,
  68. url:''
  69. }
  70. ],
  71. meunShow:false,
  72. userInfo: {
  73. avatar:'https://uviewui.com/album/1.jpg',
  74. nickName:'快马阳光冰姜'
  75. },
  76. noticeShow:true
  77. }
  78. },
  79. onLoad() {
  80. // JSON.parse(Base64.decode(that.$Route.query.classData))
  81. },
  82. onShow() {
  83. },
  84. computed: {
  85. // ...mapGetters(['isLogin'])
  86. },
  87. methods: {
  88. meunClick() {
  89. this.meunShow = true
  90. },
  91. operateClick(item) {
  92. uni.navigateTo({
  93. url:item.url
  94. })
  95. },
  96. noticeClick() {
  97. uni.navigateTo({
  98. url:'/pages/index/notice-page'
  99. })
  100. }
  101. }
  102. }
  103. </script>
  104. <style lang="scss" scoped>
  105. .btn-left {
  106. image {
  107. width: 48rpx;
  108. height: 48rpx;
  109. }
  110. }
  111. .btn-right {
  112. position: relative;
  113. image {
  114. width: 40rpx;
  115. height: 44rpx;
  116. }
  117. }
  118. .container_box {
  119. .container_main {
  120. .header-box {
  121. image {
  122. width: 100%;
  123. height: 375rpx;
  124. }
  125. }
  126. }
  127. .container_cont {
  128. padding: 32rpx;
  129. display: flex;
  130. align-items: center;
  131. justify-content: space-between;
  132. flex-wrap: wrap;
  133. .operate-item {
  134. width: 326rpx;
  135. height: 262rpx;
  136. border-radius: 16rpx;
  137. background: #FFF;
  138. display: flex;
  139. flex-direction: column;
  140. align-items: center;
  141. justify-content: center;
  142. margin-bottom: 32rpx;
  143. .operate-img {
  144. position: relative;
  145. image {
  146. width: 128rpx;
  147. height: 128rpx;
  148. }
  149. }
  150. .operate-text {
  151. color: #333;
  152. font-family: "PingFang SC";
  153. font-size: 32rpx;
  154. font-weight: 500;
  155. margin-top: 20rpx;
  156. }
  157. }
  158. }
  159. }
  160. </style>