BrandComponent.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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. components: {
  58. Page
  59. },
  60. computed: {
  61. lists () {
  62. return this.$store.state.brandComponent.component
  63. },
  64. list () {
  65. return this.lists.data
  66. },
  67. totalCount () {
  68. return this.list.totalElements
  69. }
  70. },
  71. methods: {
  72. listenPage: function (parm) {
  73. this.$emit('childEvent', parm)
  74. }
  75. }
  76. }
  77. </script>
  78. <style scoped>
  79. .component-list {
  80. float: left;
  81. margin-left: 20px;
  82. width: 970px;
  83. }
  84. .component-list .type-list{
  85. height: 34px;
  86. width: 150px;
  87. border: 1px solid #5078cb;
  88. background-color: #5078CB;
  89. float: left;
  90. color: #fff;
  91. line-height: 34px;
  92. text-align: center;
  93. font-size: 14px;
  94. }
  95. .component-list .input-group {
  96. width: 300px;
  97. float: right;
  98. border-radius: 3px;
  99. }
  100. .input-group .form-control{
  101. border-radius: 3px;
  102. }
  103. .component-list .input-group-btn .search{
  104. background: #5078cb;
  105. color: #fff;
  106. height: 34px;
  107. border-radius: 3px;
  108. }
  109. .component-list table {
  110. margin-top: 10px;
  111. width: 970px;
  112. border: 1px solid #e8e8e8;
  113. }
  114. .component-list table>thead {
  115. height: 40px;
  116. }
  117. .component-list table>thead>th {
  118. text-align: center;
  119. }
  120. .component-list table tbody tr{
  121. text-align: center;
  122. }
  123. .component-list .btn-default {
  124. color: #214797;
  125. font-size: 12px;
  126. line-height: 12px;
  127. height: 30px;
  128. }
  129. .component-list .disabledbtn {
  130. color: #A0A0A0;
  131. }
  132. .component-list td.text-center{
  133. padding: 30px 0;
  134. font-size: 20px;
  135. line-height: 40px;
  136. }
  137. .bgf7{
  138. height: 40px;
  139. }
  140. .bgf7 th{
  141. background: #f7f7f7;
  142. border-bottom: none !important;
  143. font-size: 14px;
  144. text-align: center;
  145. }
  146. .component-list .empty{
  147. overflow: hidden;
  148. text-align: center;
  149. margin: 0 auto;
  150. }
  151. .component-list .empty-img{
  152. float: left;
  153. margin-left: 335px;
  154. }
  155. .component-list .empty-info{
  156. float: left;
  157. line-height: 10px;
  158. width: 143px;
  159. margin-top: 30px;
  160. }
  161. .empty-info .grey{
  162. color: #999;
  163. font-size: 14px;
  164. }
  165. .component-list .empty-info a{
  166. font-size: 14px;
  167. color: #5078cb;
  168. }
  169. .component-list .empty-info i{
  170. font-size: 14px;
  171. color: #5078cb;
  172. }
  173. </style>