list.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view style="height: 100vh;background-color: white;">
  3. <u-swiper :list="swaiperList"></u-swiper>
  4. <!-- 宫格组件 -->
  5. <uni-section title="功能" type="line"></uni-section>
  6. <view class="cu-list grid" :class="['col-4','no-border']">
  7. <view class="cu-item" v-for="(item,index) in cuIconList" :key="index" v-if="index<4*2" v-show="item.showFlag||adminType">
  8. <view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]" @click="click(item)" >
  9. </view>
  10. <text>{{item.name}}</text>
  11. </view>
  12. </view>
  13. <view v-show="adminType">
  14. <uni-section title="系统管理" type="line"></uni-section>
  15. <view class="cu-list grid" :class="['col-4','no-border']">
  16. <view class="cu-item" v-for="(item,index) in sysManageList" :key="index" v-if="index<4*2"
  17. @click="click(item)">
  18. <view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
  19. </view>
  20. <text>{{item.name}}</text>
  21. </view>
  22. </view>
  23. </view>
  24. <u-toast ref="uToast" />
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return {
  31. cuIconList: [{
  32. cuIcon: 'writefill',
  33. color: 'red',
  34. name: '建档',
  35. url: '/pages/filing/list',
  36. showFlag:true
  37. }, {
  38. cuIcon: 'pullleft',
  39. color: 'red',
  40. name: '领活',
  41. url: '/pages/receive/list',
  42. showFlag:true
  43. }, {
  44. cuIcon: 'pullright',
  45. color: 'red',
  46. name: '送活',
  47. url: '/pages/back/list',
  48. showFlag:true
  49. }, {
  50. cuIcon: 'home',
  51. color: 'red',
  52. name: '库存',
  53. url: '/pages/stock/index',
  54. showFlag:true
  55. }, {
  56. cuIcon: 'rank',
  57. color: 'red',
  58. badge: 0,
  59. name: '计划排产',
  60. url: '/pages/plan/list',
  61. showFlag:false
  62. }, {
  63. cuIcon: 'text',
  64. color: 'red',
  65. badge: 0,
  66. name: '报表',
  67. url: '/pages/report/index',
  68. showFlag:true
  69. }],
  70. modalName: null,
  71. sysManageList: [{
  72. cuIcon: 'friendadd',
  73. color: 'red',
  74. name: '新增用户',
  75. url: '/pages/user/add'
  76. }, {
  77. cuIcon: 'friendfill',
  78. color: 'red',
  79. name: '用户管理',
  80. url:'/pages/user/list'
  81. }, {
  82. cuIcon: 'home',
  83. color: 'red',
  84. name: '车间管理',
  85. url:'/pages/workshop/list'
  86. }, {
  87. cuIcon: 'paint',
  88. color: 'red',
  89. name: '班组管理',
  90. url:'/pages/team/list'
  91. }],
  92. swaiperList: [
  93. '/static/swaiper_pic/work_space/20181112085705180.jpg',
  94. '/static/swaiper_pic/work_space/sy_xialapic.jpg',
  95. '/static/swaiper_pic/work_space/20150211145332520.jpg',
  96. '/static/swaiper_pic/work_space/sec2_lilianbg.jpg',
  97. ],
  98. adminType: false
  99. }
  100. },
  101. methods: {
  102. click(item) {
  103. console.log(item.url)
  104. uni.navigateTo({
  105. url: item.url
  106. })
  107. }
  108. },
  109. onLoad(){
  110. this.adminType = this.$store.state.user.adminType
  111. }
  112. }
  113. </script>
  114. <style lang="scss">
  115. .grid-text {
  116. font-size: 14px;
  117. color: #909399;
  118. padding: 10rpx 0 20rpx 0rpx;
  119. /* #ifndef APP-PLUS */
  120. box-sizing: border-box;
  121. /* #endif */
  122. }
  123. </style>