|
@@ -6,19 +6,12 @@
|
|
<letnav ref="letnav" :menuTree="menu"></letnav>
|
|
<letnav ref="letnav" :menuTree="menu"></letnav>
|
|
</div>
|
|
</div>
|
|
<div class="box" v-if="!isnew">
|
|
<div class="box" v-if="!isnew">
|
|
- <div class="listBoxRight" v-if="listTotal > 0">
|
|
|
|
- <el-card class="listBox" v-for="(item, index) in contentList" :key="index">
|
|
|
|
- <el-image v-if="item && item.thumbnail" :src="item.thumbnail" class="listimg" @click="newClick(item)"></el-image>
|
|
|
|
- <el-image v-else :src="thumbnail" class="listimg" @click="newClick(item)"></el-image>
|
|
|
|
- <div class="text">
|
|
|
|
- <div class="title" @click="newClick(item)">{{ item.title }}</div>
|
|
|
|
- <span class="describe" v-if="item.describe">{{ item.describe }}</span>
|
|
|
|
- <span class="date">{{ item.date | dates }}</span>
|
|
|
|
- </div>
|
|
|
|
- </el-card>
|
|
|
|
- <pagination ref="pagination" class="pagination" :total="listTotal" @query="filterQuery"></pagination>
|
|
|
|
|
|
+ <div class="text" v-for="(item, index) in contentList" :key="index">
|
|
|
|
+ <el-image class="jt" :src="icon"></el-image>
|
|
|
|
+ <div class="title" @click="newClick(item)">{{ item.title }}</div>
|
|
|
|
+ <span class="date">{{ item.date | dates }}</span>
|
|
</div>
|
|
</div>
|
|
- <el-divider class="divider" v-else>暂无数据</el-divider>
|
|
|
|
|
|
+ <pagination ref="pagination" class="pagination" :total="listTotal" @query="filterQuery"></pagination>
|
|
</div>
|
|
</div>
|
|
<div class="isnewbox" v-if="isnew">
|
|
<div class="isnewbox" v-if="isnew">
|
|
<div class="titlebox" v-for="(item, index) in isnewcontentList" :key="index">
|
|
<div class="titlebox" v-for="(item, index) in isnewcontentList" :key="index">
|
|
@@ -59,7 +52,8 @@ export default {
|
|
parentCode: null,
|
|
parentCode: null,
|
|
menu: {},
|
|
menu: {},
|
|
thumbnail: require('../assets/newimg.jpg'),
|
|
thumbnail: require('../assets/newimg.jpg'),
|
|
- isnew: false
|
|
|
|
|
|
+ isnew: false,
|
|
|
|
+ icon: require('../assets/jt.png')
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async mounted() {
|
|
async mounted() {
|
|
@@ -86,7 +80,7 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
...mapActions(['contentsList', 'menusQueryAll']),
|
|
...mapActions(['contentsList', 'menusQueryAll']),
|
|
// 查询函数
|
|
// 查询函数
|
|
- async filterQuery ({ filter = {}, paging = { page: 0, size: 10 } } = {}) {
|
|
|
|
|
|
+ async filterQuery ({ filter = {}, paging = { page: 0, size: 20 } } = {}) {
|
|
filter.bind = this.code;
|
|
filter.bind = this.code;
|
|
if (this.code.length == 2 && this.menu.children) filter.parentCode = this.code;
|
|
if (this.code.length == 2 && this.menu.children) filter.parentCode = this.code;
|
|
await this.contentsList({ filter, paging });
|
|
await this.contentsList({ filter, paging });
|
|
@@ -137,54 +131,38 @@ export default {
|
|
width: 75%;
|
|
width: 75%;
|
|
margin-top: 3%;
|
|
margin-top: 3%;
|
|
}
|
|
}
|
|
- .listBoxRight {
|
|
|
|
- width: 100%;
|
|
|
|
- .listBox {
|
|
|
|
- width: 100%;
|
|
|
|
- margin: 0 auto;
|
|
|
|
- margin-bottom: 3%;
|
|
|
|
- background: #f5f9ff;
|
|
|
|
- ::v-deep .el-card__body {
|
|
|
|
|
|
+ .box {
|
|
|
|
+ .text {
|
|
display: flex;
|
|
display: flex;
|
|
- // padding: 10px 20px !important;
|
|
|
|
- .listimg {
|
|
|
|
- display: block;
|
|
|
|
- width: 15%;
|
|
|
|
- height: 5%;
|
|
|
|
|
|
+ width: 100%;
|
|
|
|
+ margin-bottom: 5px;
|
|
|
|
+ border-bottom: 1px dashed #999;
|
|
|
|
+ .jt {
|
|
|
|
+ width: 10px;
|
|
|
|
+ height: 10px;
|
|
|
|
+ vertical-align: middle;
|
|
|
|
+ margin-top: 1%;
|
|
|
|
+ margin-left: 5px;
|
|
|
|
+ }
|
|
|
|
+ .title {
|
|
|
|
+ margin-left: 5px;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
|
+ width: 85%;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ line-height: 30px;
|
|
|
|
+ font-weight: 600;
|
|
}
|
|
}
|
|
- .text {
|
|
|
|
- width: 70%;
|
|
|
|
- margin-left: 5%;
|
|
|
|
- .title {
|
|
|
|
- cursor: pointer;
|
|
|
|
- width: 100%;
|
|
|
|
- overflow: hidden;
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
- white-space: nowrap;
|
|
|
|
- font-size: 16px;
|
|
|
|
- line-height: 30px;
|
|
|
|
- font-weight: 600;
|
|
|
|
- }
|
|
|
|
- .describe {
|
|
|
|
- width: 100%;
|
|
|
|
- overflow: hidden;
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
- display: -webkit-box;
|
|
|
|
- -webkit-line-clamp: 2;
|
|
|
|
- -webkit-box-orient: vertical;
|
|
|
|
- color: #999;
|
|
|
|
- font-size: 14px;
|
|
|
|
- }
|
|
|
|
- .date {
|
|
|
|
- width: 100%;
|
|
|
|
- color: #999;
|
|
|
|
- line-height: 2em;
|
|
|
|
- font-size: 14px;
|
|
|
|
- }
|
|
|
|
|
|
+ .date {
|
|
|
|
+ width: 10%;
|
|
|
|
+ color: #999;
|
|
|
|
+ line-height: 2em;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ text-align: right;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.pagination {
|
|
.pagination {
|