semDetail.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <div id="semDetail">
  3. <el-row>
  4. <div class="w_1200">
  5. <el-col :span="24" class="semDetail">
  6. <el-col :soan="24"> <el-image :src="gongqiuImage" class="gongqiuImage" style="width:100%;height:160px;"></el-image></el-col>
  7. <el-col :span="24" > </el-col>
  8. <el-col :span="24" class="chatInfo">
  9. <el-col :span="24" class="message">
  10. <el-col :span="24" class="info chat_frame" id="chat">
  11. <el-col :span="24" v-for="(item, index) in fabiaolist" :key="index" class="list">
  12. <el-col :span="4" class="lefts">
  13. <el-image :src="squareImage" style="width:65%;height: 128px;"></el-image>
  14. <p>
  15. <span>{{ item.name }}</span>
  16. </p>
  17. </el-col>
  18. <el-col :span="19" class="under">
  19. <p>{{ item.context }}</p>
  20. <p>{{ item.ceng }}&nbsp;&nbsp;{{ item.date }}</p>
  21. </el-col>
  22. </el-col>
  23. </el-col>
  24. </el-col>
  25. <el-col :span="24" class="input">
  26. <el-col :span="24" class="title"><i class="el-icon-edit"></i> 发布评论 </el-col>
  27. <wang-editor v-model="inputInfo" ref="editor" class="huifu"></wang-editor>
  28. <el-button type="primary">发布评论</el-button>
  29. </el-col>
  30. </el-col>
  31. </el-col>
  32. </div>
  33. </el-row>
  34. </div>
  35. </template>
  36. <script>
  37. import wangEditor from '@/components/wang-editor.vue';
  38. import { mapState, createNamespacedHelpers } from 'vuex';
  39. const { mapActions: news } = createNamespacedHelpers('news');
  40. export default {
  41. name: 'semDetail',
  42. props: {},
  43. components: {
  44. wangEditor,
  45. },
  46. data: () => ({
  47. detailinfo: {},
  48. gongqiuImage: require('@/assets/live/111.png'),
  49. squareImage: require('@/assets/live/circle.png'),
  50. inputInfo: '',
  51. fabiaolist: [{ name: '测试1', context: '测试内容', ceng: '1楼', date: '2020-03-05' }],
  52. }),
  53. created() {
  54. this.search();
  55. },
  56. computed: {
  57. id() {
  58. return this.$route.query.id;
  59. },
  60. ...mapState(['user']),
  61. pageTitle() {
  62. return `${this.$route.meta.title}`;
  63. },
  64. },
  65. methods: {
  66. ...news(['fetch']),
  67. async search() {
  68. const res = await this.fetch(this.id);
  69. this.$set(this, `detailinfo`, res.data);
  70. },
  71. },
  72. };
  73. </script>
  74. <style lang="less" scoped>
  75. .w_1200 {
  76. width: 80%;
  77. margin: 0 auto;
  78. }
  79. .semDetail {
  80. float: left;
  81. width: 100%;
  82. min-height: 600px;
  83. margin: 30px 0;
  84. }
  85. .semDetail .messInfo {
  86. float: left;
  87. width: 100%;
  88. height: 400px;
  89. overflow: hidden;
  90. }
  91. .messInfo .left p {
  92. float: left;
  93. width: 100%;
  94. font-size: 18px;
  95. padding: 5px 0 10px 0;
  96. color: gold;
  97. letter-spacing: 0;
  98. }
  99. .messInfo .left p:nth-child(2) {
  100. font-weight: bold;
  101. }
  102. .messInfo .right {
  103. font-size: 18px;
  104. line-height: 35px;
  105. text-indent: 2rem;
  106. overflow: hidden;
  107. text-overflow: ellipsis;
  108. -webkit-line-clamp: 11;
  109. word-break: break-all;
  110. display: -webkit-box;
  111. -webkit-box-orient: vertical;
  112. padding: 0 30px;
  113. border-bottom: 1px solid red;
  114. border-right: 1px solid red;
  115. height: 380px;
  116. }
  117. .semDetail .chatInfo {
  118. float: left;
  119. width: 100%;
  120. min-height: 400px;
  121. }
  122. .chatInfo .message {
  123. float: left;
  124. min-height: 190px;
  125. margin: 0 0 30px 0;
  126. }
  127. .list {
  128. border-bottom: 1px solid #fff;
  129. border-left: 1px solid #fff;
  130. min-height: 200px;
  131. background-color: #e5e5e5;
  132. padding: 15px 0 0 0;
  133. margin: 1px 0 0 1px;
  134. }
  135. .lefts {
  136. padding: 20px 0 0 20px;
  137. }
  138. .lefts p {
  139. text-align: center;
  140. width: 70%;
  141. }
  142. .under {
  143. padding: 20px;
  144. width: 80%;
  145. background-color: #fff;
  146. min-height: 160px;
  147. }
  148. .under p:first-child {
  149. float: left;
  150. width: 100%;
  151. font-size: 18px;
  152. height: 105px;
  153. overflow: hidden;
  154. text-overflow: ellipsis;
  155. -webkit-line-clamp: 4;
  156. word-break: break-all;
  157. display: -webkit-box;
  158. -webkit-box-orient: vertical;
  159. line-height: 26px;
  160. }
  161. .under p:last-child {
  162. text-align: right;
  163. font-size: 16px;
  164. }
  165. .chatInfo .input {
  166. float: left;
  167. height: 340px;
  168. overflow: hidden;
  169. text-align: center;
  170. padding: 0 10%;
  171. background-color: #e5e5e5;
  172. }
  173. .huifu {
  174. background-color: #ffffff;
  175. }
  176. .title {
  177. text-align: left;
  178. padding: 5px 0 10px 0;
  179. background-color: #e5e5e5;
  180. color: #ff7f42;
  181. }
  182. .chatInfo .input .el-button {
  183. margin: 20px 0 0 0;
  184. }
  185. </style>