directDetail.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <div id="directDetail">
  3. <el-row>
  4. <el-col :span="24" class="one">
  5. <el-col :span="7" class="oneLeft">
  6. <el-carousel trigger="click" height="210px">
  7. <template v-if="directInfo.image && directInfo.image.length > 0">
  8. <el-carousel-item v-for="(item, index) in directInfo.image" :key="index">
  9. <el-image :src="item.url" style="height:210px"> </el-image>
  10. </el-carousel-item>
  11. </template>
  12. </el-carousel>
  13. </el-col>
  14. <el-col :span="17" class="oneRight">
  15. <p class="textOver">
  16. {{ directInfo.name }}
  17. </p>
  18. <p>
  19. <span>
  20. 产品类型:{{ directInfo.totaltype === '0' ? '技术' : directInfo.totaltype === '1' ? '产品' : directInfo.totaltype === '2' ? '服务' : '暂无' }}
  21. </span>
  22. <span>
  23. 所属领域:{{
  24. `${directInfo.field}` === `0`
  25. ? '先进制造'
  26. : `${directInfo.field}` === `1`
  27. ? '新材料'
  28. : `${directInfo.field}` === `2`
  29. ? '光电子'
  30. : `${directInfo.field}` === `3`
  31. ? '信息技术'
  32. : `${directInfo.field}` === `4`
  33. ? '文化和科技融合'
  34. : '暂无'
  35. }}
  36. </span>
  37. </p>
  38. <p>
  39. <span>联系人:{{ directInfo.contact_user || '暂无' }}</span>
  40. <span>联系电话:{{ directInfo.contact_tel || '暂无' }}</span>
  41. </p>
  42. </el-col>
  43. <el-col :span="24" class="oneDown">
  44. <div>
  45. <!-- <p><span>产品参数:</span><span @click="argsBtn(directInfo.product_args)">查看详情</span></p> -->
  46. </div>
  47. <div>
  48. <p>服务范围:</p>
  49. <p class="moreScope" v-if="scope != ''">{{ directInfo.scope || '暂无' }}</p>
  50. <p class="moreScope1" v-else>{{ directInfo.scope || '暂无' }}</p>
  51. <el-button size="mini" v-if="directInfo.scope != null && directInfo.scope.length > 300">
  52. <span v-if="scope != ''" @click="scopeMore()">更多</span>
  53. <span v-else @click="scopeMore1()">收起</span>
  54. </el-button>
  55. </div>
  56. <div>
  57. <p>产品简介:</p>
  58. <p class="introduction" v-if="introduction != ''">{{ directInfo.introduction || '暂无' }}</p>
  59. <p class="introduction1" v-else>{{ directInfo.introduction || '暂无' }}</p>
  60. <el-button size="mini" v-if="directInfo.introduction != null && directInfo.introduction.length > 300">
  61. <span v-if="introduction != ''" @click="introductionMore()">更多</span>
  62. <span v-else @click="introductionMore1()">收起</span>
  63. </el-button>
  64. </div>
  65. </el-col>
  66. </el-col>
  67. </el-row>
  68. </div>
  69. </template>
  70. <script>
  71. export default {
  72. name: 'directDetail',
  73. props: {
  74. directInfo: null,
  75. },
  76. components: {},
  77. data: () => ({
  78. scope: '123',
  79. introduction: '123',
  80. }),
  81. created() {},
  82. computed: {},
  83. methods: {
  84. // 更多
  85. scopeMore() {
  86. this.scope = '';
  87. },
  88. // 收起
  89. scopeMore1() {
  90. this.scope = '123';
  91. },
  92. // 更多
  93. introductionMore() {
  94. this.introduction = '';
  95. },
  96. // 收起
  97. introductionMore1() {
  98. this.introduction = '123';
  99. },
  100. },
  101. };
  102. </script>
  103. <style lang="less" scoped>
  104. .one {
  105. min-height: 550px;
  106. .oneLeft {
  107. height: 210px;
  108. overflow: hidden;
  109. }
  110. .oneRight {
  111. padding: 0 15px;
  112. p {
  113. font-size: 16px;
  114. padding: 0 0 20px 0;
  115. span {
  116. display: inline-block;
  117. width: 50%;
  118. }
  119. }
  120. p:first-child {
  121. font-size: 18px;
  122. font-weight: bold;
  123. padding: 20px 0;
  124. }
  125. // p:nth-child(2) span:last-child {
  126. // color: red;
  127. // font-weight: bold;
  128. // }
  129. }
  130. .oneDown {
  131. border-top: 1px dashed #ccc;
  132. margin: 30px 0 0 0;
  133. padding: 30px 0 0 0;
  134. div {
  135. padding: 0 0 15px 0;
  136. p {
  137. font-size: 18px;
  138. }
  139. p:first-child {
  140. color: #333;
  141. font-weight: bold;
  142. padding: 0 0 10px 0;
  143. }
  144. }
  145. div:nth-child(2) p span:last-child {
  146. color: #409eff;
  147. padding: 0 10px;
  148. }
  149. div:nth-child(2) p span:last-child:hover {
  150. cursor: pointer;
  151. }
  152. div:nth-child(3) .moreScope {
  153. overflow: hidden;
  154. text-overflow: ellipsis;
  155. -webkit-line-clamp: 6;
  156. word-break: break-all;
  157. display: -webkit-box;
  158. -webkit-box-orient: vertical;
  159. }
  160. div:nth-child(3) .moreScope1 {
  161. overflow: none;
  162. }
  163. div:nth-child(3) .el-button {
  164. float: right;
  165. }
  166. div:last-child .introduction {
  167. overflow: hidden;
  168. text-overflow: ellipsis;
  169. -webkit-line-clamp: 6;
  170. word-break: break-all;
  171. display: -webkit-box;
  172. -webkit-box-orient: vertical;
  173. }
  174. div:last-child .introduction1 {
  175. overflow: none;
  176. }
  177. div:last-child .el-button {
  178. float: right;
  179. }
  180. }
  181. }
  182. </style>