123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <template>
- <div id="export">
- <el-row>
- <el-col :span="24" class="main">
- <el-col :span="24" class="leftTop">
- <span>|</span> <span>{{ menuName }}</span>
- </el-col>
- <el-col class="infoLeftList" :span="24" v-for="(item, index) in list" :key="index" @click.native="clickDetail(item.id)">
- <p>{{ item.publish_time || '暂无' }}</p>
- <p>
- <span class="textOver">{{ item.title }}</span>
- <span>{{ item.titlejj }}</span>
- </p>
- </el-col>
- <el-col :span="24" class="page">
- <el-pagination
- @current-change="handleCurrentChange"
- :current-page="currentPage"
- layout="total, prev, pager, next, jumper"
- :total="total"
- :page-size="pageSize"
- >
- </el-pagination>
- </el-col>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import { mapState, createNamespacedHelpers } from 'vuex';
- export default {
- name: 'export',
- props: {
- zhuantiList: { type: Array },
- total: { type: Number },
- menuName: null,
- },
- components: {},
- data: function() {
- return {
- currentPage: 1, //默认数据1
- pageSize: 5, //每页显示数据数量
- origin: [], //分割数据
- list: [], //显示数据列表
- };
- },
- created() {},
- methods: {
- searchPage(page = 1) {
- this.$set(this, `list`, this.origin[page - 1]);
- },
- handleCurrentChange(currentPage) {
- this.searchPage(currentPage);
- },
- // 详情
- clickDetail(id) {
- this.$emit('clickDetail', { columnName: '专家问诊', id: id });
- },
- },
- watch: {
- zhuantiList: {
- immediate: true,
- deep: true,
- handler(val) {
- if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
- this.searchPage();
- },
- },
- },
- computed: {
- ...mapState(['user']),
- },
- metaInfo() {
- return { title: this.$route.meta.title };
- },
- };
- </script>
- <style lang="less" scoped>
- .main {
- .leftTop {
- font-size: 18px;
- width: 96%;
- height: 41px;
- line-height: 35px;
- border-bottom: 1px solid #e5e5e5;
- position: relative;
- bottom: 1px;
- margin: 10px;
- font-weight: 600;
- color: #22529a;
- }
- .infoLeftList {
- float: left;
- width: 95%;
- border-bottom: 1px dashed #ccc;
- padding: 10px 0 10px 10px;
- height: 87px;
- margin: 0 0 0 5px;
- }
- .infoLeftList:hover p:last-child span:first-child {
- -webkit-transform: translateY(-3px);
- -ms-transform: translateY(-3px);
- transform: translateY(-3px);
- -webkit-box-shadow: 0 0 6px #999;
- box-shadow: 0 0 6px #999;
- -webkit-transition: all 0.5s ease-out;
- transition: all 0.5s ease-out;
- color: #005293;
- cursor: pointer;
- }
- .infoLeftList p:first-child {
- float: left;
- width: 20%;
- font-size: 15px;
- background: #044b79;
- text-align: center;
- color: #fff;
- font-weight: bold;
- padding: 4px 0px;
- margin: 0 0 0 5px;
- }
- .infoLeftList p:last-child {
- float: right;
- width: 70%;
- padding: 0 0 0 10px;
- }
- .infoLeftList p:last-child span:first-child {
- float: left;
- width: 90%;
- font-size: 18px;
- }
- .infoLeftList p:last-child span:last-child {
- float: left;
- width: 90%;
- font-size: 16px;
- overflow: hidden;
- text-overflow: ellipsis;
- -webkit-line-clamp: 2;
- word-break: break-all;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- margin: 5px 0 0 0;
- color: #666;
- }
- }
- .page {
- text-align: center;
- padding: 15px 0;
- }
- </style>
|