articleTwo.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <template>
  2. <div class="supplier-show">
  3. <div class="supplier-list">
  4. <template>
  5. <article-one/>
  6. </template>
  7. <div class="supplier_two">
  8. <div class="title">
  9. <span>供应商推荐</span>
  10. </div>
  11. <div class="empty" v-if="!list.content || list.content.length === 0">
  12. <div class="supplier-empty-info">
  13. <p>暂无供应商推荐信息</p>
  14. </div>
  15. </div>
  16. <ul class="list-unstyled" v-if="list && list.content">
  17. <li v-for="item in list.content.slice(0,10)" @click="jumpResource(item.uu)">
  18. <div class="img">
  19. <img :src="item.enLogoUrl || '/images/all/default.png'">
  20. </div>
  21. <div class="content_name" v-text="item.enName">深圳英优软科技有限公司</div>
  22. </li>
  23. </ul>
  24. <el-dialog
  25. title="提示"
  26. :visible.sync="hasDialog ">
  27. <div class="form_dialog">
  28. <p><span>供应商正在完善产品信息,</span>暂时不能查看更多。 </p>
  29. </div>
  30. <span slot="footer" class="dialog-footer">
  31. <a type="button" @click="hasDialog=false">我知道了</a>
  32. </span>
  33. </el-dialog>
  34. </div>
  35. </div>
  36. <div class="supplier-table">
  37. <merchant-view/>
  38. </div>
  39. </div>
  40. </template>
  41. <script>
  42. import MerchantView from '~components/supplier/merchant.vue'
  43. import ArticleOne from '~components/supplier/articleOne.vue'
  44. export default {
  45. data () {
  46. return {
  47. hasDialog: false
  48. }
  49. },
  50. components: {
  51. MerchantView,
  52. ArticleOne,
  53. },
  54. computed: {
  55. list () {
  56. return this.$store.state.supplier.merchant.recommend.data ? this.$store.state.supplier.merchant.recommend.data : []
  57. }
  58. },
  59. methods: {
  60. jumpResource (id) {
  61. if (!this.hasJump) {
  62. this.isVaildSupplier(id)
  63. }
  64. },
  65. // 判断是否有有效物料信息
  66. isVaildSupplier (id) {
  67. this.$http.get('/vendor/introduction/product/count', {params: {vendUU: id}})
  68. .then(res => {
  69. if (res.data.count !== 0) {
  70. this.$router.push('/supplier/' + id)
  71. } else {
  72. this.hasDialog = true
  73. }
  74. }, err => {
  75. console.log(err)
  76. })
  77. }
  78. }
  79. }
  80. </script>
  81. <style type="text/scss" lang="scss">
  82. .supplier-show {
  83. overflow: hidden;
  84. .supplier-list {
  85. float: left;
  86. margin-right: 15px;
  87. width: 220px;
  88. }
  89. .supplier-table {
  90. float: left;
  91. width: 955px;
  92. }
  93. }
  94. .supplier_two{
  95. position:relative;
  96. overflow: hidden;
  97. .el-dialog{
  98. width: 290px!important;
  99. .el-dialog__header{
  100. background: #4290f7;
  101. line-height: 40px;
  102. padding: 0 20px 0;
  103. display:block;
  104. .el-dialog__title{
  105. color:#fff;
  106. }
  107. .el-dialog__headerbtn:hover .el-dialog__close, .el-dialog__headerbtn:focus .el-dialog__close{
  108. color:#fff;
  109. }
  110. }
  111. .el-dialog__body{
  112. padding: 10px 20px;
  113. }
  114. .el-dialog__footer{
  115. text-align: center;
  116. a{
  117. display:inline-block;
  118. background: #3c7cf5;
  119. color:#fff;
  120. font-size: 14px;
  121. line-height: 30px;
  122. height:30px;
  123. padding:0 10px;
  124. border-radius:5px;
  125. }
  126. }
  127. }
  128. .form_dialog{
  129. p{
  130. width:200px;
  131. font-size: 14px;
  132. color:#666666;
  133. margin:0 auto;
  134. padding-top:5px;
  135. line-height: 20px;
  136. span{
  137. color:#eb6054;
  138. }
  139. }
  140. }
  141. .title{
  142. height: 34px;
  143. line-height: 34px;
  144. text-align: center;
  145. background-color: #2496f1;
  146. border-top-left-radius: 5px;
  147. border-top-right-radius: 5px;
  148. span{
  149. line-height: 35px;
  150. font-size: 14px;
  151. font-weight: bold;
  152. color:#fff;
  153. }
  154. }
  155. .empty{
  156. padding-top:30px;
  157. text-align: center;
  158. .supplier-empty-info{
  159. font-size: 14px;
  160. }
  161. }
  162. > ul{
  163. padding-top: 17px;
  164. border-radius:5px;
  165. background: #fff;
  166. height: 614px;
  167. li{
  168. position:relative;
  169. padding: 0 10px;
  170. line-height: 50px;
  171. height:50px;
  172. color:#666;
  173. overflow: hidden;
  174. margin-bottom:10px;
  175. &:hover{
  176. cursor:pointer;
  177. color:#2496f1;
  178. }
  179. .img{
  180. float:left;
  181. width:50px;
  182. height:50px;
  183. vertical-align: middle;
  184. border:1px solid #ccc;
  185. img{
  186. width:100%;
  187. height:100%;
  188. vertical-align: top;
  189. }
  190. }
  191. .content_name{
  192. margin-left:60px;
  193. width:140px;
  194. overflow: hidden;
  195. text-overflow: ellipsis;
  196. white-space:nowrap;
  197. }
  198. }
  199. }
  200. }
  201. </style>