articleOne.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <div class="supplier_one">
  3. <!--<div class="count">-->
  4. <!--已入驻 <span v-text="all"></span>-->
  5. <!--</div>-->
  6. <div class="title">新入驻供应商</div>
  7. <ul class="list-unstyled">
  8. <li v-for="item in list.content" @click="jumpResource(item.enUU)">
  9. <div class="content_name" v-text="item.storeName">深圳英优软科技有限公司</div>
  10. </li>
  11. </ul>
  12. <el-dialog
  13. title="提示"
  14. :visible.sync="hasDialog ">
  15. <div class="form_dialog">
  16. <p><span>供应商正在完善产品信息,</span>暂时不能查看更多。 </p>
  17. </div>
  18. <span slot="footer" class="dialog-footer">
  19. <a type="button" @click="hasDialog=false">我知道了</a>
  20. </span>
  21. </el-dialog>
  22. </div>
  23. </template>
  24. <script>
  25. export default {
  26. data () {
  27. return {
  28. hasDialog: false
  29. }
  30. },
  31. computed: {
  32. list () {
  33. return this.$store.state.supplier.merchant.newMerchant.data
  34. },
  35. all () {
  36. let count = this.$store.state.supplier.merchant.merchantAll.data
  37. let supplierCount = count.content ? '00000' + count.totalElements : '00000'
  38. return supplierCount.substr(-5)
  39. }
  40. },
  41. methods: {
  42. jumpResource (id) {
  43. if (!this.hasJump) {
  44. this.isVaildSupplier(id)
  45. }
  46. },
  47. // 判断是否有有效物料信息
  48. isVaildSupplier (id) {
  49. this.$http.get('/vendor/introduction/product/count', {params: {vendUU: id}})
  50. .then(res => {
  51. if (res.data.count !== 0) {
  52. this.$router.push('/supplier/' + id)
  53. } else {
  54. this.hasDialog = true
  55. }
  56. }, err => {
  57. console.log(err)
  58. })
  59. }
  60. }
  61. }
  62. </script>
  63. <style type="text/scss" lang="scss">
  64. .supplier_one{
  65. position:relative;
  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. .count{
  116. text-align: center;
  117. font-size: 25px;
  118. color:#2496f1;
  119. font-weight: bold;
  120. margin-bottom:5px;
  121. }
  122. .title{
  123. height: 34px;
  124. line-height: 34px;
  125. text-align: center;
  126. background-color: #2496f1;
  127. border-top-left-radius: 5px;
  128. border-top-right-radius: 5px;
  129. font-size: 14px;
  130. font-weight: bold;
  131. color: #fff;
  132. }
  133. ul{
  134. padding: 13px 0 0 7px;
  135. height: 366px;
  136. li{
  137. position:relative;
  138. padding: 0 18px 0 20px;
  139. margin-bottom: 10px;
  140. line-height: 25px;
  141. height:25px;
  142. color:#666;
  143. overflow: hidden;
  144. &:before{
  145. content: '';
  146. position:absolute;
  147. top: 12px;
  148. left: 7px;
  149. display:block;
  150. width:5px;
  151. height:5px;
  152. line-height: 30px;
  153. background: #2496f1;
  154. }
  155. &:hover{
  156. cursor:pointer;
  157. color:#2496f1;
  158. }
  159. .content_name{
  160. width:180px;
  161. overflow: hidden;
  162. text-overflow: ellipsis;
  163. white-space:nowrap;
  164. }
  165. }
  166. }
  167. }
  168. </style>