index.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. mapGetters
  35. } from 'vuex'
  36. export default {
  37. components:{
  38. usePop
  39. },
  40. data() {
  41. return {
  42. operateList:[
  43. {
  44. src:require('@/static/image/home/icon-jhrw.png'),
  45. text:'拣货任务',
  46. num:5,
  47. url:'/pages/picking-task/index'
  48. },
  49. {
  50. src:require('@/static/image/home/icon-cgrk.png'),
  51. text:'采购入库',
  52. num:5,
  53. url:'/pages/purchase/index'
  54. },
  55. {
  56. src:require('@/static/image/home/icon-chcx.png'),
  57. text:'存货查询',
  58. num:0,
  59. url:'/pages/inventory-inquiry/index'
  60. },
  61. {
  62. src:require('@/static/image/home/icon-pdrw.png'),
  63. text:'盘点任务',
  64. num:0,
  65. url:'/pages/check/index'
  66. }
  67. ],
  68. meunShow:false,
  69. noticeShow:true
  70. }
  71. },
  72. onLoad() {
  73. // JSON.parse(Base64.decode(that.$Route.query.classData))
  74. },
  75. onShow() {
  76. },
  77. computed: {
  78. ...mapGetters(['isLogin','userInfo'])
  79. },
  80. methods: {
  81. meunClick() {
  82. this.meunShow = true
  83. },
  84. operateClick(item) {
  85. uni.navigateTo({
  86. url:item.url
  87. })
  88. },
  89. noticeClick() {
  90. uni.navigateTo({
  91. url:'/pages/index/notice-page'
  92. })
  93. }
  94. }
  95. }
  96. </script>
  97. <style lang="scss" scoped>
  98. .btn-left {
  99. image {
  100. width: 48rpx;
  101. height: 48rpx;
  102. }
  103. }
  104. .btn-right {
  105. position: relative;
  106. image {
  107. width: 40rpx;
  108. height: 44rpx;
  109. }
  110. }
  111. .container_box {
  112. .container_main {
  113. .header-box {
  114. image {
  115. width: 100%;
  116. height: 375rpx;
  117. }
  118. }
  119. }
  120. .container_cont {
  121. padding: 32rpx;
  122. display: flex;
  123. align-items: center;
  124. justify-content: space-between;
  125. flex-wrap: wrap;
  126. .operate-item {
  127. width: 326rpx;
  128. height: 262rpx;
  129. border-radius: 16rpx;
  130. background: #FFF;
  131. display: flex;
  132. flex-direction: column;
  133. align-items: center;
  134. justify-content: center;
  135. margin-bottom: 32rpx;
  136. .operate-img {
  137. position: relative;
  138. image {
  139. width: 128rpx;
  140. height: 128rpx;
  141. }
  142. }
  143. .operate-text {
  144. color: #333;
  145. font-family: "PingFang SC";
  146. font-size: 32rpx;
  147. font-weight: 500;
  148. margin-top: 20rpx;
  149. }
  150. }
  151. }
  152. }
  153. </style>