BrandComponent.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <div class="component-list container">
  3. <div class="type-list">型号列表</div>
  4. <div class="input-group">
  5. <input type="text" class="input-sm form-control" placeholder="请输入型号"/>
  6. <span class="input-group-btn">
  7. <button class="search btn btn-default" type="button">搜索器件</button>
  8. </span>
  9. </div>
  10. <table class="table">
  11. <thead>
  12. <tr class="bgf7">
  13. <th width="500">型号</th>
  14. <th width="300">数据手册</th>
  15. <th width="200">操作</th>
  16. </tr>
  17. </thead>
  18. <tbody>
  19. <tr class="text-center" v-for="item in list.content">
  20. <td><a :href="'product/component/'+item.uuid"><span>{{item.code}}</span></a></td>
  21. <td><a :href="item.attach"><button class="btn btn-default" :disabled="!item.attach" :class="{'disabledbtn':!item.attach}">Datasheet手册</button></a></td>
  22. <td>
  23. <button class="btn btn-default disabledbtn" :disabled="true">申请样片</button>
  24. </td>
  25. </tr>
  26. <tr v-if="!list.content || list.content.length === 0">
  27. <td colspan="10" class="text-center">
  28. <div class="empty">
  29. <div class="empty-img">
  30. <img src="/images/brandList/empty-cart.png">
  31. </div>
  32. <div class="empty-info">
  33. <p class="grey f16"> 暂无器件信息 </p>
  34. <i class="fa fa-mail-reply fa-xs"></i>&nbsp;<a href="javascript:history.go(-1)">返回上一页</a>
  35. </div>
  36. </div>
  37. </td>
  38. </tr>
  39. </tbody>
  40. </table>
  41. <div style="float: right;">
  42. <!--<page :total="totalCount" :page-size="pageSize" :current="nowPage"
  43. v-on:childEvent="listenPage"></page>-->
  44. </div>
  45. </div>
  46. </template>
  47. <script>
  48. // import Page from '~components/common/page/pageComponent.vue'
  49. export default {
  50. name: 'BrandComponent',
  51. data () {
  52. return {
  53. pageSize: 10,
  54. nowPage: 1
  55. }
  56. },
  57. computed: {
  58. lists () {
  59. let components = this.$store.state.brandComponent.component
  60. console.log(components)
  61. return this.$store.state.brandComponent.component
  62. },
  63. list () {
  64. console.log(this.lists.data)
  65. return this.lists.data
  66. }
  67. }
  68. }
  69. </script>
  70. <style scoped>
  71. .component-list {
  72. float: left;
  73. margin-left: 20px;
  74. width: 970px;
  75. }
  76. .component-list .type-list{
  77. height: 34px;
  78. width: 150px;
  79. border: 1px solid #5078cb;
  80. background-color: #5078CB;
  81. float: left;
  82. color: #fff;
  83. line-height: 34px;
  84. text-align: center;
  85. font-size: 14px;
  86. }
  87. .component-list .input-group {
  88. width: 300px;
  89. float: right;
  90. border-radius: 3px;
  91. }
  92. .input-group .form-control{
  93. border-radius: 3px;
  94. }
  95. .component-list .input-group-btn .search{
  96. background: #5078cb;
  97. color: #fff;
  98. height: 34px;
  99. border-radius: 3px;
  100. }
  101. .component-list table {
  102. margin-top: 10px;
  103. width: 970px;
  104. border: 1px solid #e8e8e8;
  105. }
  106. .component-list table>thead {
  107. height: 40px;
  108. }
  109. .component-list table>thead>th {
  110. text-align: center;
  111. }
  112. .component-list table tbody tr{
  113. text-align: center;
  114. }
  115. .component-list .btn-default {
  116. color: #214797;
  117. font-size: 12px;
  118. line-height: 12px;
  119. height: 30px;
  120. }
  121. .component-list .disabledbtn {
  122. color: #A0A0A0;
  123. }
  124. .component-list td.text-center{
  125. padding: 30px 0;
  126. font-size: 20px;
  127. line-height: 40px;
  128. }
  129. .bgf7{
  130. height: 40px;
  131. }
  132. .bgf7 th{
  133. background: #f7f7f7;
  134. border-bottom: none !important;
  135. font-size: 14px;
  136. text-align: center;
  137. }
  138. .component-list .empty{
  139. overflow: hidden;
  140. text-align: center;
  141. margin: 0 auto;
  142. }
  143. .component-list .empty-img{
  144. float: left;
  145. margin-left: 335px;
  146. }
  147. .component-list .empty-info{
  148. float: left;
  149. line-height: 10px;
  150. width: 143px;
  151. margin-top: 30px;
  152. }
  153. .empty-info .grey{
  154. color: #999;
  155. font-size: 14px;
  156. }
  157. .component-list .empty-info a{
  158. font-size: 14px;
  159. color: #5078cb;
  160. }
  161. .component-list .empty-info i{
  162. font-size: 14px;
  163. color: #5078cb;
  164. }
  165. </style>