articleTwo.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. padding-top:25px;
  42. margin-bottom:20px;
  43. height:388px;
  44. background: #fff;
  45. &:before{
  46. content: '';
  47. display:block;
  48. position:absolute;
  49. top:-12px;
  50. left:1px;
  51. height:30px;
  52. width:215px;
  53. background: url(/images/applyPurchase/biaoti.png)no-repeat center;
  54. }
  55. .apply-rank {
  56. margin-bottom:10px;
  57. table {
  58. margin: 0 auto;
  59. color:#666;
  60. text-align: center;
  61. thead {
  62. background: #d3eafc;
  63. height: 26px;
  64. line-height: 26px;
  65. border-radius: 3px;
  66. tr {
  67. th {
  68. font-size: 12px;
  69. font-weight: bold;
  70. text-align: center;
  71. }
  72. }
  73. }
  74. tbody {
  75. tr {
  76. height: 30px;
  77. line-height: 30px;
  78. &:first-child {
  79. td {
  80. padding-top: 10px;
  81. }
  82. }
  83. td {
  84. color: #666;
  85. &:nth-child(1) {
  86. color: #f6682f;
  87. font-size: 12px;
  88. text-align:left;
  89. >div {
  90. width: 50px;
  91. span {
  92. font-size: 16px;
  93. }
  94. }
  95. }
  96. &:nth-child(2) {
  97. >div {
  98. width: 90px;
  99. }
  100. }
  101. &:nth-child(3) {
  102. >div {
  103. width: 60px;
  104. }
  105. }
  106. >div {
  107. overflow: hidden;
  108. text-overflow: ellipsis;
  109. white-space: nowrap;
  110. padding: 0 3px;
  111. position: relative;
  112. height: 30px;
  113. i {
  114. font-style: normal;
  115. float: right;
  116. color: #8b8b8b;
  117. font-size: 14px;
  118. position: absolute;
  119. right: 0;
  120. }
  121. }
  122. }
  123. }
  124. }
  125. }
  126. }
  127. }
  128. </style>