context.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <div id="context">
  3. <el-col :span="24" class="one">
  4. <el-col :span="7" class="oneLeft">
  5. <el-carousel trigger="click" height="210px">
  6. <template v-if="detailInfo.image && detailInfo.image.length > 0">
  7. <el-carousel-item v-for="(item, index) in detailInfo.image" :key="index">
  8. <el-image :src="item.url"> </el-image>
  9. </el-carousel-item>
  10. </template>
  11. </el-carousel>
  12. </el-col>
  13. <el-col :span="17" class="oneRight">
  14. <p class="textOver">
  15. {{ detailInfo.name }}
  16. </p>
  17. <p>
  18. <span>产品类型:{{ detailInfo.product_type_name || '暂无' }}</span>
  19. <span>收费标准:{{ detailInfo.price || '暂无' }}/{{ detailInfo.priceunit || '暂无' }}</span>
  20. </p>
  21. <p>
  22. <span>
  23. 交易方式:{{ detailInfo.business === '0' ? '公用' : detailInfo.business === '1' ? '转让' : detailInfo.business === '2' ? '竞价' : '暂无' }}
  24. </span>
  25. <span>研发阶段:{{ detailInfo.phase == 1 ? '阶段成果' : detailInfo.phase == 2 ? '最终成果' : '暂无' }}</span>
  26. </p>
  27. <p>
  28. <span>联系人:{{ detailInfo.contact_user || '暂无' }}</span>
  29. <span>联系电话:{{ detailInfo.contact_tel || '暂无' }}</span>
  30. </p>
  31. </el-col>
  32. <el-col :span="24" class="oneDown">
  33. <div>
  34. <p>应用领域:</p>
  35. <p>{{ detailInfo.field || '暂无' }}</p>
  36. </div>
  37. <div>
  38. <p>
  39. <span>产品参数:</span
  40. ><span
  41. ><el-button type="text" @click="dialogTableVisible = true">查看详情</el-button>
  42. <el-dialog title="参数" :visible.sync="dialogTableVisible">
  43. <el-table :data="detailInfo.product_args" border style="width: 100%">
  44. <el-table-column prop="arg_name" label="参数名称" :show-overflow-tooltip="true"> </el-table-column>
  45. <el-table-column prop="memo" label="参数内容" :show-overflow-tooltip="true"> </el-table-column>
  46. </el-table>
  47. </el-dialog>
  48. </span>
  49. </p>
  50. </div>
  51. <div>
  52. <p>服务范围:</p>
  53. <p class="moreScope" v-if="scope != ''">{{ detailInfo.scope || '暂无' }}</p>
  54. <p class="moreScope1" v-else>{{ detailInfo.scope || '暂无' }}</p>
  55. <el-button size="mini" @click="scopeMore()" v-if="scope != ''">更多</el-button>
  56. <el-button size="mini" @click="scopeMore1()" v-else>收起</el-button>
  57. </div>
  58. <div>
  59. <p>服务范围:</p>
  60. <p>{{ detailInfo.scope || '暂无' }}</p>
  61. </div>
  62. <div>
  63. <p>产品简介:</p>
  64. <p class="introduction" v-if="introduction != ''">{{ detailInfo.introduction || '暂无' }}</p>
  65. <p class="introduction1" v-else>{{ detailInfo.introduction || '暂无' }}</p>
  66. <el-button size="mini" v-if="detailInfo.introduction != null">
  67. <span v-if="introduction != ''" @click="introductionMore()">更多</span>
  68. <span v-else @click="introductionMore1()">收起</span>
  69. </el-button>
  70. </div>
  71. <el-col :span="24"><el-button @click="onSubmit">洽谈交易</el-button></el-col>
  72. </el-col>
  73. </el-col>
  74. </div>
  75. </template>
  76. <script>
  77. export default {
  78. name: 'context',
  79. props: {
  80. detailInfo: null,
  81. },
  82. components: {},
  83. data: () => ({
  84. dialogTableVisible: false,
  85. dialogFormVisible: false,
  86. scope: '123',
  87. introduction: '123',
  88. }),
  89. created() {},
  90. computed: {},
  91. methods: {
  92. scopeMore() {
  93. this.scope = '';
  94. },
  95. // 收起
  96. scopeMore1() {
  97. this.scope = '123';
  98. },
  99. // 更多
  100. introductionMore() {
  101. this.introduction = '';
  102. },
  103. // 收起
  104. introductionMore1() {
  105. this.introduction = '123';
  106. },
  107. onSubmit() {
  108. console.log(this.policyInfo);
  109. this.$emit('onSubmit', this.detailInfo);
  110. },
  111. },
  112. };
  113. </script>
  114. <style lang="less" scoped>
  115. p {
  116. padding: 0;
  117. margin: 0;
  118. }
  119. .textOver {
  120. overflow: hidden;
  121. text-overflow: ellipsis;
  122. white-space: nowrap;
  123. }
  124. // .textOver{}
  125. // overflow: hidden;
  126. // text-overflow: ellipsis;
  127. // -webkit-line-clamp: 3;
  128. // word-break: break-all;
  129. // display: -webkit-box;
  130. // -webkit-box-orient: vertical;
  131. // }
  132. .style {
  133. height: 100vh;
  134. }
  135. .style .info {
  136. position: relative;
  137. top: -450px;
  138. }
  139. .style .top {
  140. position: relative;
  141. top: 0;
  142. width: 100%;
  143. text-align: center;
  144. z-index: 999;
  145. height: 230px;
  146. margin: 0 0 20px 0;
  147. }
  148. .style .top p:first-child {
  149. font-size: 50px;
  150. color: #fff;
  151. }
  152. .style .top p:last-child {
  153. font-size: 30px;
  154. color: #fff;
  155. position: absolute;
  156. width: 100%;
  157. top: 170px;
  158. }
  159. .one {
  160. min-height: 550px;
  161. padding: 20px;
  162. .oneLeft {
  163. height: 210px;
  164. overflow: hidden;
  165. }
  166. .oneRight {
  167. padding: 0 15px;
  168. p {
  169. font-size: 16px;
  170. padding: 0 0 20px 0;
  171. span {
  172. display: inline-block;
  173. width: 50%;
  174. }
  175. }
  176. p:first-child {
  177. font-size: 20px;
  178. font-weight: bold;
  179. padding: 20px 0;
  180. }
  181. p:nth-child(2) span:last-child {
  182. color: red;
  183. font-weight: bold;
  184. }
  185. }
  186. .oneDown {
  187. border-top: 1px dashed #ccc;
  188. margin: 30px 0 0 0;
  189. padding: 30px 0 0 0;
  190. div {
  191. padding: 0 0 15px 0;
  192. p {
  193. font-size: 18px;
  194. }
  195. p:first-child {
  196. color: #333;
  197. font-weight: bold;
  198. padding: 0 0 10px 0;
  199. }
  200. }
  201. div:nth-child(2) p span:last-child {
  202. color: #409eff;
  203. padding: 0 10px;
  204. }
  205. div:nth-child(2) p span:last-child:hover {
  206. cursor: pointer;
  207. }
  208. div:nth-child(3) .moreScope {
  209. overflow: hidden;
  210. text-overflow: ellipsis;
  211. -webkit-line-clamp: 6;
  212. word-break: break-all;
  213. display: -webkit-box;
  214. -webkit-box-orient: vertical;
  215. }
  216. div:nth-child(3) .moreScope1 {
  217. overflow: none;
  218. }
  219. div:nth-child(3) .el-button {
  220. float: right;
  221. }
  222. div:nth-child(5) .introduction {
  223. overflow: hidden;
  224. text-overflow: ellipsis;
  225. -webkit-line-clamp: 6;
  226. word-break: break-all;
  227. display: -webkit-box;
  228. -webkit-box-orient: vertical;
  229. }
  230. div:nth-child(5) .introduction1 {
  231. overflow: none;
  232. }
  233. div:last-child .el-button {
  234. float: right;
  235. }
  236. }
  237. .mainDown {
  238. height: 50px;
  239. line-height: 50px;
  240. text-align: center;
  241. }
  242. }
  243. </style>