articleTwo.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <div class="article_two">
  3. <div class="apply-rank">
  4. <table>
  5. <thead>
  6. <tr>
  7. <th width="50">排名</th>
  8. <th width="95">型号</th>
  9. <th width="65">求购次数</th>
  10. </tr>
  11. </thead>
  12. <tbody>
  13. <tr v-for="(rank, index) in purchaseRank">
  14. <td><div>NO.<span>{{index + 1}}</span></div></td>
  15. <td>
  16. <div>
  17. <span v-if="rank.id_cmpcode" :title="rank.id_cmpcode">{{rank.id_cmpcode}}</span>
  18. <span v-if="!rank.id_cmpcode">-</span>
  19. </div>
  20. </td>
  21. <td><div>{{rank.seekAmount || 0}}</div></td>
  22. </tr>
  23. </tbody>
  24. </table>
  25. </div>
  26. </div>
  27. </template>
  28. <script>
  29. export default {
  30. computed: {
  31. purchaseRank () {
  32. return this.$store.state.applyPurchase.purchaseApplyRank.purchaseApplyRank.data
  33. }
  34. }
  35. }
  36. </script>
  37. <style lang="scss">
  38. .article_two{
  39. position:relative;
  40. border-radius:5px;
  41. border:1px solid #d2d2d2;
  42. padding-top:25px;
  43. margin-bottom:20px;
  44. &:before{
  45. content: '';
  46. display:block;
  47. position:absolute;
  48. top:-12px;
  49. left:1px;
  50. height:30px;
  51. width:215px;
  52. background: url(/images/applyPurchase/biaoti.png)no-repeat center;
  53. }
  54. .apply-rank {
  55. margin-bottom:10px;
  56. table {
  57. margin: 0 auto;
  58. color:#666;
  59. text-align: center;
  60. thead {
  61. background: #d3eafc;
  62. height: 26px;
  63. line-height: 26px;
  64. border-radius: 3px;
  65. tr {
  66. th {
  67. font-size: 12px;
  68. font-weight: bold;
  69. text-align: center;
  70. }
  71. }
  72. }
  73. tbody {
  74. tr {
  75. height: 30px;
  76. line-height: 30px;
  77. &:first-child {
  78. td {
  79. padding-top: 10px;
  80. }
  81. }
  82. td {
  83. color: #666;
  84. &:nth-child(1) {
  85. color: #f6682f;
  86. font-size: 12px;
  87. >div {
  88. width: 50px;
  89. span {
  90. font-size: 16px;
  91. }
  92. }
  93. }
  94. &:nth-child(2) {
  95. >div {
  96. width: 90px;
  97. }
  98. }
  99. &:nth-child(3) {
  100. >div {
  101. width: 60px;
  102. }
  103. }
  104. >div {
  105. overflow: hidden;
  106. text-overflow: ellipsis;
  107. white-space: nowrap;
  108. padding: 0 8px;
  109. position: relative;
  110. height: 30px;
  111. i {
  112. font-style: normal;
  113. float: right;
  114. color: #8b8b8b;
  115. font-size: 14px;
  116. position: absolute;
  117. right: 0;
  118. }
  119. }
  120. }
  121. }
  122. }
  123. }
  124. }
  125. }
  126. </style>