Employee.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view class="main-block">
  3. <view class="page-block">
  4. <view class="btn-list">
  5. <block v-for="(item,index) in power_list" :key='index'>
  6. <navigator
  7. :url="item.address" class="item flex flex-col flex-center">
  8. <image :src="item.image" class="icon-img" mode="aspectFit"></image>
  9. <view class="name">{{item.name}}</view>
  10. </navigator>
  11. <navigator v-if="item.id==256||item.name=='门店设置'" :url="`./mandatory?store_id=${store_id}`"
  12. class="item flex flex-col flex-center">
  13. <image src="./static/images/icon_8.png" class="icon-img" mode="aspectFit"></image>
  14. <view class="name">必选商品设置</view>
  15. </navigator>
  16. </block>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. store_id: "",
  26. power_list:[]
  27. }
  28. },
  29. onLoad(e) {
  30. let { list } = this.$store.state.management_list.find((v, i) => v.id == e.id)
  31. this.power_list = list
  32. this.store_id = uni.getStorageSync("store_id");
  33. },
  34. }
  35. </script>
  36. <style>
  37. .main-block {
  38. padding: 50rpx 25rpx 0;
  39. }
  40. .btn-list {
  41. display: -webkit-box;
  42. display: -webkit-flex;
  43. display: flex;
  44. -webkit-box-orient: horizontal;
  45. -webkit-box-direction: normal;
  46. -webkit-flex-flow: row wrap;
  47. flex-flow: row wrap;
  48. -webkit-box-pack: start;
  49. -webkit-justify-content: flex-start;
  50. justify-content: flex-start;
  51. -webkit-align-content: flex-start;
  52. align-content: flex-start;
  53. }
  54. .page-block {
  55. width: 700rpx;
  56. background-color: #fff;
  57. box-sizing: border-box;
  58. border-radius: 8rpx;
  59. margin-bottom: 30rpx;
  60. }
  61. .btn-list .item {
  62. width: 33.33%;
  63. height: 145rpx;
  64. }
  65. .btn-list .item .icon-img {
  66. display: block;
  67. width: 48rpx;
  68. height: 48rpx;
  69. }
  70. .btn-list .item .name {
  71. font-size: 24rpx;
  72. line-height: 33rpx;
  73. margin-top: 16rpx;
  74. color: #666;
  75. }
  76. </style>