Files
dvcp_v2_wxcp_app/src/apps/AppPartyPoints/AppPartyPoints.vue

154 lines
3.2 KiB
Vue
Raw Normal View History

2022-04-18 11:34:03 +08:00
<template>
<div class="AppPartyPoints">
<AiTopFixed>
2022-04-18 16:47:07 +08:00
<u-search placeholder="搜索党员" :show-action="false" search-icon-color="#ccc" v-model="partyName"
@search="getListInit()" @clear="getListInit()" />
2022-04-18 11:34:03 +08:00
</AiTopFixed>
2022-04-18 16:47:07 +08:00
<div class="list-content" v-if="list.length">
<div class="item" v-for="(item, index) in list" :key="index">
2022-04-18 11:34:03 +08:00
<div class="left">
2022-04-18 16:47:07 +08:00
<p>{{item.partyName}}:{{item.remark}}</p>
<div>{{item.createTime}}</div>
2022-04-18 11:34:03 +08:00
</div>
2022-04-18 16:47:07 +08:00
<div class="right" :class="'status'+item.integralType">{{item.residualIntegral}}</div>
2022-04-18 11:39:17 +08:00
</div>
2022-04-18 11:34:03 +08:00
</div>
2022-04-18 16:47:07 +08:00
<AiEmpty v-else></AiEmpty>
2022-04-18 11:34:03 +08:00
<div class="height-144"></div>
<div class="footer" @click="toAdd">
<div class="btn">积分调整</div>
</div>
</div>
</template>
<script>
import {mapState} from "vuex";
export default {
name: 'AppPartyPoints',
appName: '党员积分',
data() {
return {
2022-04-18 16:47:07 +08:00
partyName: '',
current: 1,
list: []
2022-04-18 11:34:03 +08:00
}
},
computed: {
...mapState(['user']),
},
2022-04-18 18:52:27 +08:00
onLoad() {
2022-04-18 16:47:07 +08:00
this.getList()
2022-04-18 18:52:27 +08:00
uni.$on('reload', () => {
this.getListInit()
})
2022-04-18 11:34:03 +08:00
},
onShow() {
document.title = '党员积分'
},
methods: {
2022-04-18 16:47:07 +08:00
getList() {
this.$http.post('/app/apppartyintegralinfo/list', null, {
params: {
size: 20,
current: this.current,
partyName: this.partyName
},
})
.then((res) => {
if (res.code == 0) {
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
}
})
},
getListInit() {
this.current = 1
this.datas = []
this.getList()
},
2022-04-18 11:34:03 +08:00
toAdd() {
uni.navigateTo({url: './Add'})
},
},
2022-04-18 16:47:07 +08:00
onReachBottom() {
this.current = this.current + 1
this.getList()
},
2022-04-18 11:34:03 +08:00
}
</script>
<style lang="scss" scoped>
.AppPartyPoints {
min-height: 100%;
::v-deep .AiTopFixed .u-search {
margin-bottom: 0 !important;
}
.list-content{
padding: 4px 48px 16px;
background-color: #fff;
.item{
width: 100%;
padding: 34px 0 32px 0;
display: flex;
justify-content: space-between;
border-bottom: 1px solid #ddd;
.left{
width: 500px;
p{
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 44px;
word-break: break-all;
margin-bottom: 8px;
}
div{
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 34px;
}
}
.right{
width: calc(100% - 500px);
font-size: 36px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
line-height: 50px;
text-align: right;
}
.status0{
color: #2C51CE;
}
.status0{
color: #E6736E;
}
}
}
.height-144{
height: 144px;
}
.footer {
width: 100%;
position: fixed;
bottom: 0;
left: 0;
}
.btn {
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
background: #3975C6;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #fff;
}
}
</style>