articleOne.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. border:1px solid #ccc;
  66. padding-top:90px;
  67. border-radius:5px;
  68. padding-bottom:5px;
  69. margin-bottom:15px;
  70. background: #fff;
  71. min-height:400px;
  72. .el-dialog{
  73. width: 290px!important;
  74. .el-dialog__header{
  75. background: #4290f7;
  76. line-height: 40px;
  77. padding: 0 20px 0;
  78. display:block;
  79. .el-dialog__title{
  80. color:#fff;
  81. }
  82. .el-dialog__headerbtn:hover .el-dialog__close, .el-dialog__headerbtn:focus .el-dialog__close{
  83. color:#fff;
  84. }
  85. }
  86. .el-dialog__body{
  87. padding: 10px 20px;
  88. }
  89. .el-dialog__footer{
  90. text-align: center;
  91. a{
  92. display:inline-block;
  93. background: #3c7cf5;
  94. color:#fff;
  95. font-size: 14px;
  96. line-height: 30px;
  97. height:30px;
  98. padding:0 10px;
  99. border-radius:5px;
  100. }
  101. }
  102. }
  103. .form_dialog{
  104. p{
  105. width:200px;
  106. font-size: 14px;
  107. color:#666666;
  108. margin:0 auto;
  109. padding-top:5px;
  110. line-height: 20px;
  111. span{
  112. color:#eb6054;
  113. }
  114. }
  115. }
  116. &:before{
  117. content: '';
  118. position:absolute;
  119. top:0;
  120. left:0;
  121. display:block;
  122. width:100%;
  123. height:92px;
  124. background: url(/images/supplier/header_img.png)no-repeat center center
  125. }
  126. .count{
  127. text-align: center;
  128. font-size: 25px;
  129. color:#2496f1;
  130. font-weight: bold;
  131. margin-bottom:5px;
  132. }
  133. ul{
  134. li{
  135. position:relative;
  136. padding: 0 18px 0 20px;
  137. line-height: 25px;
  138. height:25px;
  139. color:#666;
  140. overflow: hidden;
  141. &:before{
  142. content: '';
  143. position:absolute;
  144. top: 12px;
  145. left: 7px;
  146. display:block;
  147. width:5px;
  148. height:5px;
  149. line-height: 30px;
  150. background: #2496f1;
  151. }
  152. &:hover{
  153. cursor:pointer;
  154. color:#2496f1;
  155. }
  156. .content_name{
  157. width:180px;
  158. overflow: hidden;
  159. text-overflow: ellipsis;
  160. white-space:nowrap;
  161. }
  162. }
  163. }
  164. }
  165. </style>