export.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <div id="export">
  3. <el-row>
  4. <el-col :span="24" class="main">
  5. <el-col :span="24" class="leftTop">
  6. <span>|</span> <span>{{ menuName }}</span>
  7. </el-col>
  8. <el-col class="infoLeftList" :span="24" v-for="(item, index) in list" :key="index" @click.native="clickDetail(item.id)">
  9. <p>{{ item.publish_time || '暂无' }}</p>
  10. <p>
  11. <span class="textOver">{{ item.title }}</span>
  12. <span>{{ item.titlejj }}</span>
  13. </p>
  14. </el-col>
  15. <el-col :span="24" class="page">
  16. <el-pagination
  17. @current-change="handleCurrentChange"
  18. :current-page="currentPage"
  19. layout="total, prev, pager, next, jumper"
  20. :total="total"
  21. :page-size="pageSize"
  22. >
  23. </el-pagination>
  24. </el-col>
  25. </el-col>
  26. </el-row>
  27. </div>
  28. </template>
  29. <script>
  30. import { mapState, createNamespacedHelpers } from 'vuex';
  31. export default {
  32. name: 'export',
  33. props: {
  34. zhuantiList: { type: Array },
  35. total: { type: Number },
  36. menuName: null,
  37. },
  38. components: {},
  39. data: function() {
  40. return {
  41. currentPage: 1, //默认数据1
  42. pageSize: 5, //每页显示数据数量
  43. origin: [], //分割数据
  44. list: [], //显示数据列表
  45. };
  46. },
  47. created() {},
  48. methods: {
  49. searchPage(page = 1) {
  50. this.$set(this, `list`, this.origin[page - 1]);
  51. },
  52. handleCurrentChange(currentPage) {
  53. this.searchPage(currentPage);
  54. },
  55. // 详情
  56. clickDetail(id) {
  57. this.$emit('clickDetail', { columnName: '专家问诊', id: id });
  58. },
  59. },
  60. watch: {
  61. zhuantiList: {
  62. immediate: true,
  63. deep: true,
  64. handler(val) {
  65. if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
  66. this.searchPage();
  67. },
  68. },
  69. },
  70. computed: {
  71. ...mapState(['user']),
  72. },
  73. metaInfo() {
  74. return { title: this.$route.meta.title };
  75. },
  76. };
  77. </script>
  78. <style lang="less" scoped>
  79. .main {
  80. .leftTop {
  81. font-size: 18px;
  82. width: 96%;
  83. height: 41px;
  84. line-height: 35px;
  85. border-bottom: 1px solid #e5e5e5;
  86. position: relative;
  87. bottom: 1px;
  88. margin: 10px;
  89. font-weight: 600;
  90. color: #22529a;
  91. }
  92. .infoLeftList {
  93. float: left;
  94. width: 95%;
  95. border-bottom: 1px dashed #ccc;
  96. padding: 10px 0 10px 10px;
  97. height: 87px;
  98. margin: 0 0 0 5px;
  99. }
  100. .infoLeftList:hover p:last-child span:first-child {
  101. -webkit-transform: translateY(-3px);
  102. -ms-transform: translateY(-3px);
  103. transform: translateY(-3px);
  104. -webkit-box-shadow: 0 0 6px #999;
  105. box-shadow: 0 0 6px #999;
  106. -webkit-transition: all 0.5s ease-out;
  107. transition: all 0.5s ease-out;
  108. color: #005293;
  109. cursor: pointer;
  110. }
  111. .infoLeftList p:first-child {
  112. float: left;
  113. width: 20%;
  114. font-size: 15px;
  115. background: #044b79;
  116. text-align: center;
  117. color: #fff;
  118. font-weight: bold;
  119. padding: 4px 0px;
  120. margin: 0 0 0 5px;
  121. }
  122. .infoLeftList p:last-child {
  123. float: right;
  124. width: 70%;
  125. padding: 0 0 0 10px;
  126. }
  127. .infoLeftList p:last-child span:first-child {
  128. float: left;
  129. width: 90%;
  130. font-size: 18px;
  131. }
  132. .infoLeftList p:last-child span:last-child {
  133. float: left;
  134. width: 90%;
  135. font-size: 16px;
  136. overflow: hidden;
  137. text-overflow: ellipsis;
  138. -webkit-line-clamp: 2;
  139. word-break: break-all;
  140. display: -webkit-box;
  141. -webkit-box-orient: vertical;
  142. margin: 5px 0 0 0;
  143. color: #666;
  144. }
  145. }
  146. .page {
  147. text-align: center;
  148. padding: 15px 0;
  149. }
  150. </style>