articleOne.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <div class="supplier_one">
  3. <div class="count">
  4. 已入驻 <span v-text="all"></span>
  5. </div>
  6. <ul class="list-unstyled">
  7. <li v-for="item in list.content" @click="jumpResource(item.enUU)">
  8. <div class="content_name" v-text="item.storeName">深圳英优软科技有限公司</div>
  9. </li>
  10. </ul>
  11. <el-dialog
  12. title="提示"
  13. :visible.sync="hasDialog ">
  14. <div class="form_dialog">
  15. <p><span>供应商正在完善产品信息,</span>暂时不能查看更多。 </p>
  16. </div>
  17. <span slot="footer" class="dialog-footer">
  18. <a type="button" @click="hasDialog=false">我知道了</a>
  19. </span>
  20. </el-dialog>
  21. </div>
  22. </template>
  23. <script>
  24. export default {
  25. data () {
  26. return {
  27. hasDialog: false
  28. }
  29. },
  30. computed: {
  31. list () {
  32. return this.$store.state.supplier.merchant.newMerchant.data
  33. },
  34. all () {
  35. let count = this.$store.state.supplier.merchant.merchantAll.data
  36. let supplierCount = count.content ? '00000' + count.totalElements : '00000'
  37. return supplierCount.substr(-5)
  38. }
  39. },
  40. methods: {
  41. jumpResource (id) {
  42. if (!this.hasJump) {
  43. this.isVaildSupplier(id)
  44. }
  45. },
  46. // 判断是否有有效物料信息
  47. isVaildSupplier (id) {
  48. this.$http.get('vendor/introduction/product/count', {params: {vendUU: id}})
  49. .then(res => {
  50. if (res.data.count !== 0) {
  51. this.$router.push('supplier/' + id)
  52. } else {
  53. this.hasDialog = true
  54. }
  55. }, err => {
  56. console.log(err)
  57. })
  58. }
  59. }
  60. }
  61. </script>
  62. <style type="text/scss" lang="scss">
  63. .supplier_one{
  64. position:relative;
  65. padding-top:90px;
  66. border-radius:5px;
  67. padding-bottom:5px;
  68. margin-bottom:15px;
  69. background: #fff;
  70. min-height:400px;
  71. .el-dialog{
  72. width: 290px!important;
  73. .el-dialog__header{
  74. background: #4290f7;
  75. line-height: 40px;
  76. padding: 0 20px 0;
  77. display:block;
  78. .el-dialog__title{
  79. color:#fff;
  80. }
  81. .el-dialog__headerbtn:hover .el-dialog__close, .el-dialog__headerbtn:focus .el-dialog__close{
  82. color:#fff;
  83. }
  84. }
  85. .el-dialog__body{
  86. padding: 10px 20px;
  87. }
  88. .el-dialog__footer{
  89. text-align: center;
  90. a{
  91. display:inline-block;
  92. background: #3c7cf5;
  93. color:#fff;
  94. font-size: 14px;
  95. line-height: 30px;
  96. height:30px;
  97. padding:0 10px;
  98. border-radius:5px;
  99. }
  100. }
  101. }
  102. .form_dialog{
  103. p{
  104. width:200px;
  105. font-size: 14px;
  106. color:#666666;
  107. margin:0 auto;
  108. padding-top:5px;
  109. line-height: 20px;
  110. span{
  111. color:#eb6054;
  112. }
  113. }
  114. }
  115. &:before{
  116. content: '';
  117. position:absolute;
  118. top:0;
  119. left:0;
  120. display:block;
  121. width:100%;
  122. height:92px;
  123. background: url(/images/supplier/header_img.png)no-repeat center center
  124. }
  125. .count{
  126. text-align: center;
  127. font-size: 25px;
  128. color:#2496f1;
  129. font-weight: bold;
  130. margin-bottom:5px;
  131. }
  132. ul{
  133. li{
  134. position:relative;
  135. padding: 0 18px 0 20px;
  136. line-height: 25px;
  137. height:25px;
  138. color:#666;
  139. overflow: hidden;
  140. &:before{
  141. content: '';
  142. position:absolute;
  143. top: 12px;
  144. left: 7px;
  145. display:block;
  146. width:5px;
  147. height:5px;
  148. line-height: 30px;
  149. background: #2496f1;
  150. }
  151. &:hover{
  152. cursor:pointer;
  153. color:#2496f1;
  154. }
  155. .content_name{
  156. width:180px;
  157. overflow: hidden;
  158. text-overflow: ellipsis;
  159. white-space:nowrap;
  160. }
  161. }
  162. }
  163. }
  164. </style>