Files
dvcp_v2_wxcp_app/src/project/fd/AppPointsReview/AppPointsReview.vue

255 lines
6.5 KiB
Vue
Raw Normal View History

2023-03-30 14:28:16 +08:00
<template>
<div class="AppPointsReview">
<AiTopFixed>
<div class="top-search">
<div class="left">
2023-03-31 17:09:09 +08:00
<u-search v-model="search.name" :clearabled="true" placeholder="请输入申请人,审批人" :show-action="false" bg-color="#F5F5F5"
2023-03-30 14:28:16 +08:00
search-icon-color="#999" color="#999" height="58" @search="getListInit" @clear="getListInit">
</u-search>
</div>
</div>
<div class="top-select">
2023-03-31 17:09:09 +08:00
<div class="item" @click="showDateSelect=true">
<span v-if="!search.startTime" style="color:#999;">日期筛选</span>
<span v-else>{{ search.startTime }}{{ search.endTime }}</span>
2023-03-30 14:28:16 +08:00
<u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" />
</div>
2023-03-31 17:09:09 +08:00
<div class="item" @click="isShowType=true">
<span style="color:#999;" v-if="!search.type">事件类型</span>
<span v-else>{{ search.typeName }}</span>
2023-03-30 14:28:16 +08:00
<u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" />
</div>
</div>
</AiTopFixed>
<div class="list-content">
2023-03-31 11:31:25 +08:00
<div class="item" @click="toDetail">
2023-03-30 14:28:16 +08:00
<div class="title-flex">
<p class="title">事件类型事件类型事件类型事件类型事件类型事件类型</p>
<div class="btn">
2023-03-31 17:09:09 +08:00
<div @click.stop="pushNew(1)">推送精选</div>
<p>已推送</p>
2023-03-30 14:28:16 +08:00
</div>
</div>
<div class="user-name">李进放<span>积分+5</span></div>
<div class="time-flex">
<span>2023-03-30 09:09</span>
2023-03-31 11:31:25 +08:00
<span class="color-0">审核通过</span>
2023-03-30 14:28:16 +08:00
</div>
</div>
<div class="item">
<div class="title-flex">
<p class="title">事件类型事件类型事件类型事件类型事件类型事件类型事件类型事件类型型事件类型事件类型事件类型</p>
</div>
<div class="user-name">李进放<span>积分+5</span></div>
<div class="time-flex">
<span>2023-03-30 09:09</span>
2023-03-31 11:31:25 +08:00
<span class="color-0">审核通过</span>
2023-03-30 14:28:16 +08:00
</div>
</div>
</div>
2023-03-31 17:09:09 +08:00
<AiEmpty v-if="!list.length" description="暂无数据"></AiEmpty>
<u-calendar v-model="showDateSelect" mode="range" min-year="2023" @change="dateConfirm"></u-calendar>
<u-select v-model="isShowType" :list="typeList" value-name="id" label-name="ruleName" @confirm="typeConfirm"></u-select>
2023-03-30 14:28:16 +08:00
</div>
</template>
<script>
export default {
name: "AppPointsReview",
appName: "积分审核",
data() {
return {
keyword: '',
areaId: '',
areaName: '',
2023-03-31 17:09:09 +08:00
showDateSelect: false,
search: {
name: '',
startTime: '',
endTime: '',
type: '',
typeName: ''
},
list: [],
current: 1,
pages: 2,
typeList: [],
isShowType: false,
2023-03-30 14:28:16 +08:00
};
},
2023-03-31 17:09:09 +08:00
onLoad() {
this.getTypeList()
this.getListInit()
},
2023-03-30 14:28:16 +08:00
onShow() {
},
methods: {
getListInit() {
2023-03-31 17:09:09 +08:00
this.current = 1
this.getList()
},
getList() {
if (this.current > this.pages) return
this.$http.post(`/app/appintegraluserapply/list`, null, {
...this.search,
current: this.current,
size: 10
}).then(res=> {
if(res?.data) {
this.list = this.current > 1 ? [...this.list, ...res.data.records]: res.data.records
this.pages = Math.ceil(res.data.total / 10)
}
})
2023-03-30 14:28:16 +08:00
},
2023-03-31 17:09:09 +08:00
dateConfirm(e) {
this.search.startTime = e.startDate
this.search.endTime = e.endDate
2023-03-30 14:28:16 +08:00
this.getListInit()
},
2023-03-31 11:31:25 +08:00
toDetail() {
uni.navigateTo({url: `./detail`})
2023-03-31 17:09:09 +08:00
},
getTypeList() {
this.$http.post(`/app/appintegralrule/listByFD?size=100`).then(res=> {
if(res?.data) {
this.typeList = res.data
}
})
},
typeConfirm(e) {
this.search.type = e[0].value
this.search.typeName = e[0].label
this.getListInit()
},
pushNew(id) {
this.$confirm('确定推送该条为精选', '').then(() => {
this.$http.post(`/app/appintegraluserapply/pushById?id=${id}`).then(res=> {
if(res?.data) {
this.getListInit()
}
})
})
2023-03-31 11:31:25 +08:00
}
2023-03-30 14:28:16 +08:00
},
2023-03-31 17:09:09 +08:00
onReachBottom() {
this.current = this.current + 1;
this.getList();
},
2023-03-30 14:28:16 +08:00
};
</script>
<style lang="scss" scoped>
.AppPointsReview {
height: 100%;
::v-deep .AiTopFixed {
.placeholder {
.content {
padding: 0 !important;
}
}
.fixed {
margin: 0 !important;
.content {
padding: 0 !important;
}
}
}
.top-search {
padding: 20px 32px;
display: flex;
.left {
width: 100%;
}
}
.top-select {
display: flex;
padding: 28px 0;
.item {
flex: 1;
2023-03-31 17:09:09 +08:00
// padding: 0 8px;
2023-03-30 14:28:16 +08:00
text-align: center;
span {
display: inline-block;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28px;
color: #666;
line-height: 40px;
}
}
}
.list-content {
padding: 32px;
.item {
border-radius: 8px;
padding: 32px;
background-color: #fff;
margin-bottom: 32px;
.title-flex {
display: flex;
.title {
word-break: break-all;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
2023-03-31 11:31:25 +08:00
-webkit-box-orient: vertical;
margin-bottom: 16px;
color: #333;
font-size: 32px;
font-weight: 500;
font-family: "PingFang SC";
line-height: 44px;
2023-03-30 14:28:16 +08:00
}
.btn {
text-align: right;
padding-left: 32px;
div {
width: 150px;
text-align: center;
2023-03-31 11:31:25 +08:00
border-radius: 8px;
2023-03-30 14:28:16 +08:00
line-height: 56px;
background: #1365DD;
color: #fff;
font-size: 28px;
}
p {
font-size: 28px;
color: #666;
}
}
}
2023-03-31 11:31:25 +08:00
.user-name {
font-size: 28px;
color: #666;
line-height: 34px;
margin-bottom: 16px;
span {
margin-left: 32px;
}
}
.time-flex {
display: flex;
justify-content: space-between;
font-size: 28px;
color: #999;
line-height: 34px;
.color-0{
color: #42D784;
}
.color-1{
color: #cd413aff;
}
.color-2{
color: #1365DD;
}
}
2023-03-30 14:28:16 +08:00
}
}
}
</style>