zoneFloor.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <view>
  3. <view class="page-content clearfix" v-for="(page, index) in list" :key="index">
  4. <view class="tui-group-title">
  5. <view class="tui-group-name">{{ page.floorTitle }}</view>
  6. <view class="tui-group-tabs">
  7. <view class="tui-group-tabs-left">
  8. <view class="tui-tabs-item" @click="handleNavTo(page,1)">产品</view>
  9. <view class="tui-tabs-item" @click="handleNavTo(page,2)">仪器</view>
  10. <view class="tui-tabs-item" @click="handleNavTo(page,3)">耗材配件</view>
  11. </view>
  12. <view class="tui-group-tabs-right" @click="handleNavTo(page,0)">
  13. <text>更多</text>
  14. <text class="iconfont icon-xiayibu"></text>
  15. </view>
  16. </view>
  17. </view>
  18. <templateZ :pageData="page" :userIdentity="userIdentity"></templateZ>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import templateZ from './template-page/templateZ.vue'
  24. export default {
  25. name: 'zoneFloor',
  26. components: {
  27. templateZ
  28. },
  29. props: {
  30. list: {
  31. type: Array
  32. },
  33. pageType: {
  34. type: Number
  35. },
  36. userIdentity: {
  37. type: Number
  38. }
  39. },
  40. data() {
  41. return {
  42. pageFloorList: []
  43. }
  44. },
  45. created() {
  46. },
  47. watch: {
  48. list: {
  49. handler: function (el) {//监听对象的变换使用 function,箭头函数容易出现this指向不正确
  50. this.list = el
  51. },
  52. deep: true
  53. }
  54. },
  55. methods: {
  56. handleNavTo(page,typeSort) {
  57. //跳转
  58. this.$api.navigateTo(`/pages/goods/good-floor-zone?zoneId=${page.id}&typeSort=${typeSort}&floorTitle=${page.floorTitle}`)
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss">
  64. .page-content {
  65. background-color: #F7F7F7;
  66. width: 100%;
  67. height: auto;
  68. box-sizing: border-box;
  69. padding: 0 24rpx;
  70. }
  71. .tui-group-title {
  72. width: 100%;
  73. display: flex;
  74. justify-content: space-between;
  75. align-items: center;
  76. height: 100rpx;
  77. box-sizing: border-box;
  78. .tui-group-name {
  79. font-size: $font-size-36;
  80. font-weight: bold;
  81. color: #333333;
  82. }
  83. .tui-group-tabs{
  84. height: 100rpx;
  85. display: flex;
  86. justify-content: space-between;
  87. align-items: center;
  88. .tui-group-tabs-left{
  89. display: flex;
  90. justify-content: space-between;
  91. align-items: center;
  92. margin-right: 20rpx;
  93. .tui-tabs-item{
  94. display: flex;
  95. font-size: $font-size-28;
  96. line-height: 100rpx;
  97. color: #333;
  98. margin: 0 15rpx;
  99. }
  100. }
  101. .tui-group-tabs-right{
  102. font-size: $font-size-24;
  103. line-height: 100rpx;
  104. color: #999999;
  105. .icon-xiayibu {
  106. font-size: $font-size-30;
  107. color: #999999;
  108. }
  109. }
  110. }
  111. }
  112. </style>