铝交易,微信公众号
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

180 lines
3.4 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
6 months ago
6 months ago
5 months ago
6 months ago
  1. <template>
  2. <view class="trading-platform">
  3. <topbar showRight="0"></topbar>
  4. <view class="frame">
  5. <!--顶部栏-->
  6. <!--折线图-->
  7. <view class="chart">
  8. 折线图
  9. </view>
  10. <!-- 供应商 -->
  11. <view class="supplier" v-if="userShop">
  12. <view style="" class="purchaser-title">
  13. <span class="active"> {{ $t('other.orderList') }}</span>
  14. </view>
  15. <view class="supplierList">
  16. <orderList :list="list" />
  17. </view>
  18. </view>
  19. <!-- 采购商 -->
  20. <view class="purchaser" v-else>
  21. <!--切换现货/期货-->
  22. <view style="" class="purchaser-title">
  23. <span @click="actionIndexChange(index)" v-for="(item, index) in type" :class="actionIndex == index ? 'active' : 'noactive'">{{ item.name }}</span>
  24. </view>
  25. <view class="productList">
  26. <productList :list="list" />
  27. </view>
  28. </view>
  29. </view>
  30. <tabber select="1" />
  31. </view>
  32. </template>
  33. <script>
  34. import tabber from '@/components/base/tabbar.vue'
  35. import topbar from "@/components/base/topbar.vue";
  36. import {
  37. mapGetters
  38. } from 'vuex'
  39. import ProductList from "@/components/user/productList.vue";
  40. import OrderList from "@/pages_order/components/order/orderList.vue";
  41. import mixinList from '@/mixins/list.js'
  42. export default {
  43. mixins : [mixinList],
  44. components: {
  45. OrderList,
  46. ProductList,
  47. topbar,
  48. tabber,
  49. },
  50. computed: {
  51. ...mapGetters(['userShop']),
  52. },
  53. data() {
  54. return {
  55. actionIndex: 0,
  56. mixinsListApi : 'getMyProductlist',
  57. type : [
  58. {
  59. name : this.$t('other.spotTrading')
  60. },
  61. {
  62. name : this.$t('other.futuresTrading')
  63. },
  64. ],
  65. }
  66. },
  67. onLoad() {
  68. if(this.userShop){
  69. // 现货/期货列表
  70. this.mixinsListApi = 'productList'
  71. }else{
  72. // 交易平台挂单列表
  73. this.mixinsListApi = 'productlist'
  74. this.queryParams.productType = this.actionIndex
  75. }
  76. },
  77. methods: {
  78. // 切换tab
  79. actionIndexChange(index) {
  80. // index为0时切换到现货交易,index为1时切换到期货交易
  81. this.actionIndex = index;
  82. this.queryParams.productType = this.actionIndex
  83. this.getData()
  84. },
  85. }
  86. }
  87. </script>
  88. <style scoped lang="scss">
  89. .trading-platform {
  90. background-image: url('../../static/image/index/1.png');
  91. .frame {
  92. display: flex;
  93. flex-direction: column;
  94. justify-content: center;
  95. height: calc(100vh - 120rpx - 120rpx);
  96. .chart {
  97. height: 30%;
  98. }
  99. .supplier {
  100. height: 70%;
  101. padding: 20rpx 20rpx;
  102. background-image: url('../../static/image/index/1.png');
  103. color: #FFF;
  104. font-size: 32rpx;
  105. .supplierList {
  106. margin-top: 20rpx;
  107. height: 92%;
  108. overflow: auto;
  109. }
  110. .purchaser-title {
  111. height: 8%;
  112. .active {
  113. text-decoration: underline;
  114. width: 80rpx;
  115. margin: 20rpx 20rpx 20rpx 20rpx;
  116. padding: 10rpx 20rpx;
  117. }
  118. .noactive {
  119. width: 80rpx;
  120. margin: 20rpx 20rpx 20rpx 20rpx;
  121. padding: 10rpx 20rpx;
  122. }
  123. }
  124. }
  125. .purchaser {
  126. height: 60%;
  127. padding: 20rpx 0;
  128. color: #FFF;
  129. font-size: 32rpx;
  130. .purchaser-title {
  131. .active {
  132. text-decoration: underline;
  133. width: 80rpx;
  134. margin: 20rpx 20rpx 20rpx 20rpx;
  135. padding: 10rpx 20rpx;
  136. }
  137. .noactive {
  138. width: 80rpx;
  139. margin: 20rpx 20rpx 20rpx 20rpx;
  140. padding: 10rpx 20rpx;
  141. }
  142. }
  143. .productList {
  144. margin-top: 20rpx;
  145. height: 60vh;
  146. overflow: auto;
  147. }
  148. }
  149. }
  150. }
  151. </style>