details.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <template>
  2. <div class="details_info">
  3. <div class="container">
  4. <div class="top">
  5. <div class="img">
  6. <img src="/images/store/common/default.png">
  7. </div>
  8. <div class="right">
  9. <h4>32222222222222222222</h4>
  10. <ul class="list-unstyled">
  11. <li class="item">
  12. <span>类目(名称)</span>
  13. <p v-text="spliceString(test, 400)">3errrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr2</p>
  14. </li>
  15. <li class="item">
  16. <span>品牌</span>
  17. <p>32</p>
  18. </li>
  19. <li class="item">
  20. <span>单位</span>
  21. <p>32</p>
  22. </li>
  23. <li class="item">
  24. <span>规格</span>
  25. <p>32</p>
  26. </li>
  27. <li class="item">
  28. <span>种类</span>
  29. <p>32</p>
  30. </li>
  31. </ul>
  32. <a @click="dialogVisible = true">立即询价</a>
  33. </div>
  34. </div>
  35. <div class="info">
  36. <table>
  37. <thead>
  38. <tr>
  39. <th colspan="4">
  40. <p>产品参数 <span>(仅供参考,以实际产品为准)</span></p>
  41. </th>
  42. </tr>
  43. </thead>
  44. <tbody>
  45. <tr>
  46. <td width="297">工作温度范围: </td>
  47. <td width="297"></td>
  48. <td width="297">最大输入电压:</td>
  49. <td width="297"></td>
  50. </tr>
  51. <tr>
  52. <td>输出电压-Vout: </td>
  53. <td></td>
  54. <td>负载调节:</td>
  55. <td></td>
  56. </tr>
  57. <tr>
  58. <td>输出类型: </td>
  59. <td></td>
  60. <td>安装方式:</td>
  61. <td></td>
  62. </tr>
  63. <tr>
  64. <td>工作温度范围: </td>
  65. <td></td>
  66. <td>最大输入电压:</td>
  67. <td></td>
  68. </tr>
  69. <tr>
  70. <td>输出电压-Vout: </td>
  71. <td></td>
  72. <td>负载调节:</td>
  73. <td></td>
  74. </tr>
  75. <tr>
  76. <td>输出类型: </td>
  77. <td></td>
  78. <td>安装方式:</td>
  79. <td></td>
  80. </tr>
  81. </tbody>
  82. </table>
  83. </div>
  84. </div>
  85. <el-dialog
  86. title="我要询价"
  87. :visible.sync="dialogVisible "
  88. width="35%"
  89. :before-close="handleClose">
  90. <div class="form_dialog">
  91. <span>这是一段信息</span>
  92. </div>
  93. <span slot="footer" class="dialog-footer">
  94. <el-button type="primary" @click="dialogVisible = false">询价提交</el-button>
  95. </span>
  96. </el-dialog>
  97. </div>
  98. </template>
  99. <script>
  100. import {cutOutString} from '~utils/baseUtils.js'
  101. export default {
  102. name: 'DetailsView',
  103. data () {
  104. return {
  105. dialogVisible: false,
  106. searchCode: '',
  107. test: '322222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222'
  108. }
  109. },
  110. methods: {
  111. spliceString (str, length) {
  112. return cutOutString(str, length)
  113. },
  114. handleClose (done) {
  115. this.$confirm('确认关闭?')
  116. .then(_ => {
  117. done()
  118. })
  119. .catch(_ => {})
  120. }
  121. }
  122. }
  123. </script>
  124. <style scoped type="text/scss" lang="scss">
  125. .details_info{
  126. background: #ecf1f1;
  127. .top{
  128. margin-bottom:20px;
  129. .img{
  130. float:left;
  131. width:350px;
  132. height:350px;
  133. vertical-align: top;
  134. padding:36px;
  135. border:1px solid #bababa;
  136. img{
  137. width:100%;
  138. height:100%;
  139. }
  140. }
  141. .right{
  142. position:relative;
  143. height:350px;
  144. margin-left:370px;
  145. h4{
  146. width:800px;
  147. font-size: 25px;
  148. line-height: 25px;
  149. font-weight: bold;
  150. overflow: hidden;
  151. text-overflow: ellipsis;
  152. white-space:nowrap;
  153. border-bottom:1px solid #3c7cf5;
  154. margin:0;
  155. padding-bottom:20px;
  156. }
  157. a{
  158. display:inline-block;
  159. position:absolute;
  160. bottom:0;
  161. left: 0;
  162. background: #3c7cf5;
  163. color:#fff;
  164. font-size: 14px;
  165. line-height: 30px;
  166. height:30px;
  167. padding:0 10px;
  168. }
  169. ul{
  170. padding-top:35px;
  171. li{
  172. margin-bottom:25px;
  173. span{
  174. display:inline-block;
  175. width:70px;
  176. float:left;
  177. color:#3c7cf5;
  178. vertical-align: top;
  179. text-align: right;
  180. }
  181. p{
  182. width:365px;
  183. font-size: 14px;
  184. color:#333;
  185. margin:0;
  186. margin-left:90px;
  187. word-wrap: break-word;
  188. word-break: normal;
  189. }
  190. }
  191. }
  192. }
  193. }
  194. .info{
  195. padding-bottom:90px;
  196. table{
  197. thead{
  198. tr{
  199. line-height: 34px;
  200. th{
  201. font-weight: bold;
  202. color:#fff;
  203. background: #3c7cf5;
  204. padding-left:15px;
  205. p{
  206. font-size: 16px;
  207. margin:0;
  208. span{
  209. font-size: 12px;
  210. }
  211. }
  212. }
  213. }
  214. }
  215. tbody{
  216. tr{
  217. line-height: 34px;
  218. &:nth-child(odd){
  219. background: #fff;
  220. }
  221. &:nth-child(even){
  222. background: #f5f6f8;
  223. }
  224. td{
  225. text-align: center;
  226. }
  227. }
  228. }
  229. }
  230. }
  231. }
  232. </style>