226 lines
5.2 KiB
Vue
226 lines
5.2 KiB
Vue
<template>
|
||
<div class="AppIntegralAudit">
|
||
<!-- tab栏 -->
|
||
<div class="tab-select">
|
||
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{item}}<span></span></div>
|
||
</div>
|
||
|
||
<!-- 列表 -->
|
||
<div>
|
||
<div class="search-box" v-if="tabIndex==0">
|
||
<div class="integral-types" @click="showType = true">{{ type? type : '积分类型' }}<u-icon name="arrow-down"></u-icon></div>
|
||
<u-search placeholder="请输入关键字" v-model="keyword" :show-action="false" @search="search" />
|
||
</div>
|
||
|
||
<div class="card-list" v-if="integralList.length">
|
||
<div class="card-item" @click="toDetail(item)" v-for="(item,index) in integralList" :key="index">
|
||
<div class="card-title">{{ item.description }}</div>
|
||
<div class="card-name">
|
||
<div class="name">{{ $dict.getLabel('atWillReportType',item.applyIntegralType) }}</div>
|
||
<div class="time">{{ item.createTime }}</div>
|
||
</div>
|
||
<div class="card-type">
|
||
<div class="type" :style="{color: item.auditStatus==0? '#4181FF':item.auditStatus==1? '#07c160' : '#dd5347'}">{{ $dict.getLabel('integralDeclareStatus',item.auditStatus) }}</div>
|
||
<div class="num">+20</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
|
||
|
||
<u-select v-model="showType" :list="$dict.getDict('atWillReportType')" label-name="dictName" value-name="dictValue"
|
||
@confirm="confirmTypeSelect"/>
|
||
</div>
|
||
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
export default {
|
||
name: 'AppIntegralAudit',
|
||
appName: '积分审核',
|
||
data () {
|
||
return {
|
||
tabs: ['全部', '待审核', '已审核'],
|
||
tabIndex: 0,
|
||
showType: false,
|
||
keyword: '',
|
||
typeList: [],
|
||
current: 1,
|
||
integralList: [],
|
||
type: '',
|
||
applyIntegralType: '', // 积分类型
|
||
}
|
||
},
|
||
created() {
|
||
this.$dict.load('atWillReportType','integralDeclareStatus').then(()=>{
|
||
this.getList()
|
||
})
|
||
},
|
||
methods: {
|
||
tabClick(index) {
|
||
this.current=1
|
||
this.integralList=[]
|
||
this.tabIndex = index
|
||
this.getList()
|
||
},
|
||
|
||
getList() {
|
||
this.$http.post('/app/appvillagerintegraldeclare/list',null,{
|
||
params: {
|
||
current: 1,
|
||
size: 10,
|
||
description : this.keyword,
|
||
applyIntegralType: this.applyIntegralType,
|
||
auditStatus: this.tabIndex== 0 ? "" : this.tabIndex == 1 ? 0 : this.tabIndex == 2 ? "1|2" : ''
|
||
}
|
||
}).then(res => {
|
||
if(res.code==0){
|
||
this.integralList = this.current > 1 ? [...this.integralList, ...res.data.records] : res.data.records
|
||
this.$forceUpdate()
|
||
}
|
||
})
|
||
},
|
||
search() {
|
||
this.current = 1,
|
||
this.getList()
|
||
},
|
||
|
||
confirmTypeSelect(e) {
|
||
console.log(e);
|
||
this.type = e[0].label
|
||
this.applyIntegralType = e[0].value
|
||
this.current = 1,
|
||
this.integralList = []
|
||
this.getList()
|
||
},
|
||
|
||
toDetail(item) {
|
||
uni.navigateTo({url: `./detail?id=${item.id}`})
|
||
}
|
||
},
|
||
onShow() {
|
||
document.title = '积分审核'
|
||
},
|
||
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.AppIntegralAudit {
|
||
|
||
.tab-select {
|
||
width: 100%;
|
||
height: 96px;
|
||
line-height: 96px;
|
||
background: #3975C6;
|
||
display: flex;
|
||
|
||
.item{
|
||
flex: 1;
|
||
text-align: center;
|
||
font-size: 28px;
|
||
font-family: PingFangSC-Regular, PingFang SC;
|
||
color: #CDDCF0;
|
||
}
|
||
|
||
.active{
|
||
font-family: PingFangSC-Medium, PingFang SC;
|
||
font-weight: 500;
|
||
position: relative;
|
||
color: #fff;
|
||
span{
|
||
width: 48px;
|
||
height: 4px;
|
||
background: #FFF;
|
||
position: absolute;
|
||
bottom: 14px;
|
||
left: 50%;
|
||
margin-left: -24px;
|
||
}
|
||
}
|
||
}
|
||
|
||
.search-box {
|
||
display: flex;
|
||
width: 100%;
|
||
height: 112px;
|
||
line-height: 112px;
|
||
background-color: #FFFFFF;
|
||
padding: 0 32px;
|
||
box-sizing: border-box;
|
||
|
||
.integral-types {
|
||
width: 45%;
|
||
}
|
||
}
|
||
|
||
.card-list {
|
||
width: 100%;
|
||
padding: 0 32px;
|
||
box-sizing: border-box;
|
||
|
||
.card-item {
|
||
margin-top: 24px;
|
||
background-color: #FFFFFF;
|
||
box-shadow: 0px 0px 8px 8px rgba(0, 0, 0, 0.02);
|
||
border-radius: 16px;
|
||
padding: 30px 32px 20px 32px;
|
||
|
||
.card-title {
|
||
height: 60px;
|
||
line-height: 60px;
|
||
font-size: 36px;
|
||
color: #333333;
|
||
overflow:hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
-o-text-overflow:ellipsis;
|
||
}
|
||
|
||
.card-name {
|
||
margin-top: 30px;
|
||
display: flex;
|
||
height: 50px;
|
||
line-height: 50px;
|
||
font-size: 28px;
|
||
color: #999999;
|
||
|
||
.name {
|
||
padding: 0 30px;
|
||
background: #EEEEEE;
|
||
border-radius: 24px;
|
||
margin-right: 40px;
|
||
}
|
||
}
|
||
|
||
.card-type {
|
||
margin-top: 30px;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
|
||
.type {
|
||
font-size: 28px;
|
||
}
|
||
|
||
.num {
|
||
font-size: 34px;
|
||
color: #E6736E;
|
||
}
|
||
|
||
.status0 {
|
||
color: #FF9B2B;
|
||
}
|
||
|
||
.status1 {
|
||
color: #4181FF;
|
||
}
|
||
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
|
||
}
|
||
</style>
|