semDetail.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. <template>
  2. <div id="semDetail">
  3. <el-row>
  4. <div class="w_1200">
  5. <el-col :span="24" class="main">
  6. <el-col :span="24" class="one">
  7. <el-image :src="gongqiuImage"></el-image>
  8. </el-col>
  9. <el-col :span="24" class="two">
  10. <el-col :span="24" class="twoTop">
  11. <el-col :span="3" class="left">
  12. 浏览次数:1
  13. </el-col>
  14. <el-col :span="21" class="right"> [专题] {{ detail.title }} </el-col>
  15. </el-col>
  16. <el-col :span="24" class="twoInfo">
  17. <el-col class="list" v-for="(item, index) in list" :key="index">
  18. <el-col :span="3" class="left">
  19. <el-col :span="24" class="leftTop">
  20. 会员名称
  21. </el-col>
  22. <el-col :span="24" class="leftDown">
  23. <el-image :src="squareImage"></el-image>
  24. <el-col :span="24" class="jobname">
  25. {{ item.name }}
  26. </el-col>
  27. </el-col>
  28. </el-col>
  29. <el-col :span="21" class="right">
  30. <el-col :span="24" class="date">
  31. <i class="el-icon-user icon"></i>
  32. <span>发表于{{ item.date }}</span>
  33. <span>{{ index + 1 }}楼</span>
  34. </el-col>
  35. <el-col :span="24" class="info">
  36. <p>{{ item.content }}</p>
  37. </el-col>
  38. <el-col :span="24" class="jubao">
  39. <span>举报</span>
  40. </el-col>
  41. </el-col>
  42. </el-col>
  43. </el-col>
  44. <el-col :span="24" class="twoPage">
  45. <page :total="total" position="right"></page>
  46. </el-col>
  47. <el-col :span="24" class="twoInput">
  48. <el-col :span="3" class="left"> </el-col>
  49. <el-col :span="21" class="right">
  50. <el-col :span="24" class="waneditor">
  51. <wang-editor v-model="inputInfo" ref="editor"></wang-editor>
  52. </el-col>
  53. <el-col :span="24" class="btn">
  54. <el-button type="primary">发表评论</el-button>
  55. </el-col>
  56. </el-col>
  57. </el-col>
  58. </el-col>
  59. </el-col>
  60. </div>
  61. </el-row>
  62. </div>
  63. </template>
  64. <script>
  65. import wangEditor from '@/components/wang-editor.vue';
  66. import page from '@/components/pagination.vue';
  67. import { mapState, createNamespacedHelpers } from 'vuex';
  68. const { mapActions: news } = createNamespacedHelpers('news');
  69. export default {
  70. name: 'semDetail',
  71. props: {},
  72. components: { page, wangEditor },
  73. data: () => ({
  74. gongqiuImage: require('@/assets/live/111.png'),
  75. squareImage: require('@/assets/live/222.png'),
  76. detail: {},
  77. list: [
  78. {
  79. name: '测试人员',
  80. date: '2020-02-02',
  81. content: '测试内容',
  82. },
  83. {
  84. name: '测试人员',
  85. date: '2020-02-02',
  86. content: '测试内容',
  87. },
  88. {
  89. name: '测试人员',
  90. date: '2020-02-02',
  91. content: '测试内容',
  92. },
  93. ],
  94. total: 0,
  95. inputInfo: '',
  96. }),
  97. created() {
  98. this.search();
  99. },
  100. computed: {
  101. id() {
  102. return this.$route.query.id;
  103. },
  104. ...mapState(['user']),
  105. pageTitle() {
  106. return `${this.$route.meta.title}`;
  107. },
  108. },
  109. methods: {
  110. ...news(['fetch']),
  111. async search() {
  112. const res = await this.fetch(this.id);
  113. this.$set(this, `detail`, res.data);
  114. },
  115. },
  116. };
  117. </script>
  118. <style lang="less" scoped>
  119. .w_1200 {
  120. width: 80%;
  121. margin: 0 auto;
  122. }
  123. .main {
  124. float: left;
  125. width: 100%;
  126. min-height: 600px;
  127. margin: 30px 0;
  128. }
  129. .main .one {
  130. float: left;
  131. width: 100%;
  132. height: 160px;
  133. margin: 0 0 30px 0;
  134. }
  135. .main .two {
  136. float: left;
  137. width: 100%;
  138. }
  139. .main .two .twoTop {
  140. float: left;
  141. width: 100%;
  142. height: 60px;
  143. }
  144. .main .two .twoTop .left {
  145. float: left;
  146. height: 60px;
  147. line-height: 50px;
  148. text-align: center;
  149. font-size: 18px;
  150. color: #00316e;
  151. background: #a5d2f5;
  152. border-bottom: 10px solid #044b79;
  153. }
  154. .main .two .twoTop .right {
  155. float: left;
  156. height: 60px;
  157. line-height: 50px;
  158. padding: 0 15px;
  159. font-size: 30px;
  160. color: #023658;
  161. border-bottom: 10px solid #5096d2;
  162. }
  163. .main .two .twoInfo {
  164. float: left;
  165. width: 100%;
  166. }
  167. .main .two .twoInfo .left {
  168. background: #5096d2;
  169. border-bottom: 10px solid #044b79;
  170. }
  171. .main .two .twoInfo .left .leftTop {
  172. height: 60px;
  173. line-height: 60px;
  174. text-align: center;
  175. color: #fff;
  176. font-size: 22px;
  177. border-bottom: 1px dashed #ccc;
  178. }
  179. .main .two .twoInfo .left .leftDown {
  180. height: 420px;
  181. }
  182. .main .two .twoInfo .left .leftDown .el-image {
  183. width: 155px;
  184. height: 155px;
  185. margin: 40px 18px;
  186. }
  187. .main .two .twoInfo .left .leftDown .jobname {
  188. text-align: center;
  189. font-size: 22px;
  190. color: #fffcae;
  191. }
  192. .main .two .twoInfo .right {
  193. padding: 0 20px;
  194. }
  195. .main .two .twoInfo .right .date {
  196. padding: 0 20px;
  197. height: 60px;
  198. line-height: 60px;
  199. border-bottom: 1px dashed #ccc;
  200. }
  201. .main .two .twoInfo .right .date .icon {
  202. font-size: 30px;
  203. color: #b6dd59;
  204. }
  205. .main .two .twoInfo .right .date span:nth-child(2) {
  206. font-size: 20px;
  207. padding: 0px 10px;
  208. position: relative;
  209. top: -2px;
  210. }
  211. .main .two .twoInfo .right .date span:last-child {
  212. font-size: 20px;
  213. float: right;
  214. }
  215. .main .two .twoInfo .right .info {
  216. height: 300px;
  217. overflow: hidden;
  218. border: 2px solid #044b79;
  219. border-radius: 10px;
  220. margin: 30px 0;
  221. padding: 20px;
  222. }
  223. .main .two .twoInfo .right .info p {
  224. font-size: 20px;
  225. overflow: hidden;
  226. text-overflow: ellipsis;
  227. -webkit-line-clamp: 8;
  228. word-break: break-all;
  229. display: -webkit-box;
  230. -webkit-box-orient: vertical;
  231. line-height: 32px;
  232. }
  233. .main .two .twoInfo .right .jubao {
  234. height: 70px;
  235. line-height: 60px;
  236. border-top: 1px dashed #ff8b0f;
  237. border-bottom: 10px solid #5096d2;
  238. }
  239. .main .two .twoInfo .right .jubao span {
  240. float: right;
  241. color: #ff0000;
  242. font-size: 20px;
  243. }
  244. .main .two .twoPage {
  245. margin: 20px 0;
  246. }
  247. .main .two .twoInput {
  248. height: 270px;
  249. border: 2px solid #5096d2;
  250. }
  251. .main .two .twoInput .left {
  252. height: 266px;
  253. background-color: #5096d2;
  254. }
  255. .main .two .twoInput .right {
  256. padding: 20px 20px 0 20px;
  257. }
  258. /deep/.main .two .twoInput .right .waneditor .w-e-text-container {
  259. height: 140px !important;
  260. }
  261. .main .two .twoInput .right .btn {
  262. margin: 10px 0;
  263. }
  264. /deep/.main .two .twoInput .right .btn .el-button {
  265. margin: 10px 0;
  266. }
  267. </style>