Files
dvcp_v2_wxcp_app/src/apps/AppPovertyHome/AppPovertyHome.vue

189 lines
4.4 KiB
Vue
Raw Normal View History

2022-03-24 11:31:42 +08:00
<template>
<div class="info">
<div class="info-top">
2022-05-10 16:03:43 +08:00
<div class="info-top__item" @click="linkTo('../AppMonitoringObject/AppMonitoringObject')" v-if="$permissions('app_apppreventionreturntopoverty_detail')">
2022-03-24 11:31:42 +08:00
<image :src="$cdn + 'wdbf.png'"/>
<h2>监测对象</h2>
</div>
2022-07-21 10:19:50 +08:00
<div class="info-top__item" @click="linkTo('../AppHelpEffect/AppHelpEffect')" v-if="$permissions('app_apppreventionreturntopoverty_detail')">
<image :src="$cdn + 'wdbf.png'"/>
<h2>帮扶成效</h2>
</div>
2022-03-26 16:55:09 +08:00
<div class="info-top__item" @click="linkTo('../AppWarningMonitoring/AppWarningMonitoring')">
2022-03-24 11:31:42 +08:00
<image :src="$cdn + 'yjjk.png'"/>
<h2>预警监控</h2>
</div>
2022-05-19 13:35:55 +08:00
<div class="info-top__item" @click="linkTo('../AppHelpDeclaration/list')">
<image :src="$cdn + 'sbsp.png'"/>
<h2>申报审批</h2>
2022-03-24 11:31:42 +08:00
</div>
</div>
<div class="news">
2022-05-19 13:35:55 +08:00
<u-section title="最新动态" :show-line="false" font-size="32" bold sub-title="全部" @click="linkTo('../AppServicePublic/AppServicePublic?moduleId=ac80f2857f2c4e4d8f0e266a703aed7a&listName=政策动态')"></u-section>
2022-04-01 14:10:32 +08:00
<div class="news-list" v-if="list.length">
2022-03-24 11:31:42 +08:00
<div class="news-item" v-for="(item, index) in list" :key="index"
2022-03-28 15:21:38 +08:00
@click="linkTo(`../AppServicePublic/Detail?id=${item.id}&listName=政策动态`)">
2022-03-24 11:31:42 +08:00
<div class="left">
<h2>{{ item.title }}</h2>
<div class="item-bottom">
2022-03-28 15:21:38 +08:00
<span>{{ item.categoryName || '' }}</span>
2022-03-24 11:31:42 +08:00
<span>{{ item.createTime }}</span>
</div>
</div>
<image v-if="item.coverFile" :src="item.coverFile ? item.coverFile.url : ''"/>
</div>
</div>
2022-04-01 14:10:32 +08:00
<AiEmpty description="暂无数据" v-else></AiEmpty>
2022-03-24 11:31:42 +08:00
</div>
</div>
</template>
<script>
export default {
name: "AppPovertyHome",
appName: "防返贫",
data() {
return {
list: []
}
},
onLoad() {
this.$dict.load(['newsCenterPolicyType']).then(() => {
this.getList()
})
2022-05-19 13:35:55 +08:00
// console.log(this.$cdn + 'wdbf.png')
2022-03-24 11:31:42 +08:00
},
onShow() {
document.title = "防返贫"
},
methods: {
linkTo(url) {
uni.navigateTo({url})
},
getList() {
2022-03-28 11:44:10 +08:00
this.$http.post('/app/appcontentinfo/list', null, {
2022-03-24 11:31:42 +08:00
params: {
2022-03-28 11:44:10 +08:00
size: 20,
2022-03-24 11:31:42 +08:00
current: 1,
2022-03-28 11:44:10 +08:00
moduleId: 'ac80f2857f2c4e4d8f0e266a703aed7a',
},
})
.then((res) => {
2022-05-06 10:18:12 +08:00
if (res?.data) {
2022-03-24 11:31:42 +08:00
this.list = res.data.records
}
})
2022-03-28 11:44:10 +08:00
// this.$http.post(`/app/appnewscenterinfo/listForWx`, null, {
// params: {
// current: 1,
// size: 10,
// status: 1
// }
// }).then(res => {
// if (res.code == 0) {
// this.list = res.data.records
// }
// })
2022-03-24 11:31:42 +08:00
}
}
}
</script>
<style lang="scss">
.info {
background: #f5f5f5;
padding: 32px 30px;
.info-top {
display: flex;
align-items: center;
margin-bottom: 32px;
background: #FFFFFF;
border-radius: 16px;
div {
flex: 1;
padding: 32px 0;
text-align: center;
image {
width: 80px;
height: 80px;
}
h2 {
margin-top: 4px;
color: #3D434A;
font-size: 28px;
font-weight: normal;
}
}
}
.news {
2022-05-19 13:35:55 +08:00
& > .u-section {
2022-03-24 11:31:42 +08:00
margin-bottom: 32px;
}
.news-item {
display: flex;
align-items: center;
margin-bottom: 20px;
padding: 32px 24px;
background: #fff;
border-radius: 14px;
&:active {
background: #eee;
}
&:last-child {
border-bottom: none;
}
.left {
flex: 1;
margin-right: 20px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
& > image {
width: 200px;
height: 140px;
}
h2 {
width: 100%;
margin-bottom: 32px;
color: #333333;
font-size: 30px;
font-weight: 600;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.item-bottom {
display: flex;
align-items: center;
span {
color: #999999;
font-size: 24px;
&:first-child {
margin-right: 32px;
}
}
}
}
}
}
</style>