procurement.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <view class="proInit">
  3. <tui-skeleton
  4. v-if="skeletonShow"
  5. backgroundColor="#fafafa"
  6. borderRadius="10rpx"
  7. :isLoading="true"
  8. :loadingType="5"
  9. ></tui-skeleton>
  10. <view v-else>
  11. <tui-tabs :tabs="tabs" :currentTab="currentTab" @change="handlerTabs" class="tab"></tui-tabs>
  12. <view class="tabsContent" @modelData='modelData' v-for="(item, index) in 5" :key="index" :style="{marginTop: index === 0 ? '40px' : ''}">
  13. <proCard />
  14. </view>
  15. </view>
  16. <!-- 弹窗提示 -->
  17. <tui-modal
  18. :show="modal"
  19. @click="handleClick"
  20. @cancel="hideMobel"
  21. :content="contentModalText"
  22. :button="modalButton"
  23. color="#333"
  24. :size="32"
  25. shape="circle"
  26. :maskClosable="false"
  27. >
  28. </tui-modal>
  29. <view class="add_btn">
  30. <image style="width: 100%;height: 100%;" src="@/static/procurement/add_pro.png"></image>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import proCard from './components/procurement_card.vue'
  36. export default {
  37. components: {
  38. proCard,
  39. },
  40. data() {
  41. return {
  42. skeletonShow: true,
  43. tabs: [
  44. {
  45. name: '全部'
  46. },
  47. {
  48. name:'我参与的'
  49. },
  50. {
  51. name: '我发起的'
  52. }
  53. ],
  54. currentTab: 0,
  55. modal: false,
  56. contentModalText: '确定退出参与该需求吗?',
  57. modalButton: [
  58. {
  59. text: '取消',
  60. type: 'gray',
  61. plain: true, //是否空心
  62. },
  63. {
  64. text: '确认',
  65. customStyle: {
  66. color: '#fff',
  67. bgColor: 'linear-gradient(90deg, #F28F31 0%, #F3B574 100%)'
  68. },
  69. plain: false
  70. }
  71. ]
  72. }
  73. },
  74. mounted() {
  75. this.skeletonShow = false
  76. },
  77. methods:{
  78. handlerTabs($event) {
  79. console.log($event)
  80. this.currentTab = $event.index
  81. },
  82. handleClick($event) {
  83. console.log($event.index)
  84. this.modal = false
  85. },
  86. hideMobel($event) {},
  87. modelData(proData) {
  88. console.log(proData)
  89. },
  90. },
  91. }
  92. </script>
  93. <style lang="scss" scoped>
  94. .proInit .tab {
  95. position: fixed;
  96. left: 0;
  97. top: 0;
  98. z-index: 9;
  99. }
  100. ::v-deep .tui-tabs-slider.data-v-9311a734 {
  101. background: #F3B574 !important;
  102. }
  103. ::v-deep .tui-tabs-title.tui-tabs-active {
  104. color: #F3B574 !important;
  105. }
  106. .tabsContent {
  107. background-color: #F7F7F7;
  108. padding: 16rpx 32rpx;
  109. // margin-bottom: 32rpx;
  110. }
  111. .add_btn {
  112. width: 100rpx;
  113. height: 100rpx;
  114. position: fixed;
  115. bottom: 129rpx;
  116. right: 34rpx;
  117. }
  118. </style>