积分排行
This commit is contained in:
@@ -12,7 +12,9 @@
|
||||
<div class="right">
|
||||
<h2 class="color-E6736E">
|
||||
<span v-if="item.ruleType == 0">+{{item.integral}}</span>
|
||||
<span v-if="item.ruleType == 1">+{{item.ladderRule[0].integral}}-{{item.ladderRule[1].integral}}</span>
|
||||
<span v-if="item.ruleType == 1">+{{item.ladderRule[0].integral}}
|
||||
<span v-if="item.ladderRule[1]">-{{item.ladderRule[1].integral}}</span>
|
||||
</span>
|
||||
<span v-if="item.ruleType == 2">+{{item.integralMin}}-{{item.integralMax}}</span>
|
||||
<u-icon name="arrow-right" color="#ddd" size="24" style="margin-left: 4px" ></u-icon>
|
||||
</h2>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
<div class="wrapper">
|
||||
<div class="fixed">
|
||||
<div class="header">
|
||||
<div class="ai-area__wrapper" @click="toSelect">
|
||||
<div class="ai-area__wrapper" @click="showSelectOrg=true" :style="tabIndex == 1 ? 'width:100%;' : ''">
|
||||
<img src="./img/location-icon.png" alt="" class="location-icon">
|
||||
<span class="label" v-if="partyName" style="color:#E6736E;">{{ partyName }}</span>
|
||||
<span class="label" v-if="partyOrgName" style="color:#E6736E;">{{ partyOrgName }}</span>
|
||||
<span v-else style="color:#E6736E;">请选择</span>
|
||||
<u-icon name="arrow-down" color="#E6736E" size="24" style="margin-left: 4px" ></u-icon>
|
||||
</div>
|
||||
<div class="right" @click="showDate=true">{{searchDate}}<u-icon name="arrow-down" color="#333" size="24" style="margin-left: 4px" ></u-icon></div>
|
||||
<div class="right" @click="showDate=true" v-if="tabIndex != 1">{{searchDate}}<u-icon name="arrow-down" color="#333" size="24" style="margin-left: 4px" ></u-icon></div>
|
||||
</div>
|
||||
<div class="tab-list">
|
||||
<div class="tab-item" v-for="(item, index) in tabList" :key="index" @click="tabClick(index)" :style="tabIndex == index ? 'color:#333;' : ''">{{ item }}
|
||||
@@ -17,15 +17,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="list">
|
||||
<div class="item">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="left">
|
||||
<div class="index">1</div>
|
||||
<img src="./img/user-img.png" alt="">李维民
|
||||
<div class="index">{{index+1}}</div>
|
||||
<img :src="item.avatarUrl" alt="" v-if="item.avatarUrl">
|
||||
<img src="./img/user-img.png" alt="" v-else>
|
||||
{{item.name}}
|
||||
</div>
|
||||
<div class="right">70分</div>
|
||||
<div class="right">{{item.integral}}分</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length"/>
|
||||
</div>
|
||||
<u-picker mode="time" v-model="showDate" :params="dateParams" @confirm="selectDate"></u-picker>
|
||||
<u-select v-model="showSelectOrg" :list="partyOrgList" @confirm="confirmSelect" value-name="id" label-name="name"></u-select>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -39,8 +43,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
partyName: '',
|
||||
partyId: '',
|
||||
tabList: ['月度排行', '累计排行'],
|
||||
tabIndex: 0,
|
||||
searchDate: '',
|
||||
@@ -53,6 +55,13 @@ export default {
|
||||
minute: false,
|
||||
second: false
|
||||
},
|
||||
partyOrgId: '',
|
||||
partyOrgName: '',
|
||||
partyOrgList: [],
|
||||
showSelectOrg: false,
|
||||
current: 1,
|
||||
pages: 2,
|
||||
list: []
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
@@ -60,48 +69,62 @@ export default {
|
||||
frontColor: "#ffffff",
|
||||
backgroundColor: "#E76056",
|
||||
})
|
||||
uni.$on('selectParty', (res) => {
|
||||
this.partyName = res.name
|
||||
this.partyId = res.id
|
||||
})
|
||||
this.partyOrgId = this.user.partyOrgId
|
||||
this.partyOrgName = this.user.partyOrgName
|
||||
var datetime = new Date();
|
||||
var year = datetime.getFullYear();
|
||||
var month = datetime.getMonth() + 1 < 10 ? '0' + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
|
||||
this.searchDate = `${year}-${month}`
|
||||
this.getList()
|
||||
this.getPartyOrgList()
|
||||
},
|
||||
methods: {
|
||||
tabClick(index) {
|
||||
this.tabIndex = index
|
||||
// if (!this.tabIndex) {
|
||||
// this.status = ''
|
||||
// } else {
|
||||
// this.status = this.tabIndex - 1
|
||||
// }
|
||||
// this.getList()
|
||||
this.getListInit()
|
||||
},
|
||||
selectDate(e) {
|
||||
this.searchDate = `${e.year}-${e.month}`
|
||||
this.getListInit()
|
||||
},
|
||||
toSelect() {
|
||||
uni.navigateTo({url: './search'})
|
||||
getListInit() {
|
||||
this.current = 1
|
||||
this.pages = 2
|
||||
this.list = []
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
if (this.current > this.pages) return;
|
||||
this.$instance.post(`/app/apppartyintegralinfo/integralDetailForWX`, null, {
|
||||
this.$instance.post(`/app/apppartyintegralinfo/listByOrg`, null, {
|
||||
params: {
|
||||
partyId: this.user.partyId,
|
||||
partyOrgId: this.partyOrgId,
|
||||
current: this.current,
|
||||
year: this.searchDate,
|
||||
year: this.tabIndex == 1 ? '' : this.searchDate,
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.integral = res.data.integral
|
||||
const list = this.current > 1 ? [...this.list, ...res.data.infoIPage.records] : res.data.infoIPage.records
|
||||
this.pages = res.data.infoIPage.pages
|
||||
const list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
||||
this.pages = res.data.pages
|
||||
this.list = list
|
||||
}
|
||||
});
|
||||
},
|
||||
getPartyOrgList() {
|
||||
this.$instance.post(`/app/partyOrganization/queryPartyOrganizationServiceList`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.partyOrgList = res.data
|
||||
}
|
||||
});
|
||||
},
|
||||
confirmSelect(e) {
|
||||
this.partyOrgId = e[0].value
|
||||
this.partyOrgName = e[0].label
|
||||
this.getListInit()
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current ++
|
||||
this.getList()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -127,7 +150,12 @@ export default {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
.ai-area__wrapper{
|
||||
width: calc(100% - 200px);
|
||||
}
|
||||
.right{
|
||||
width: 150px;
|
||||
text-align: center;
|
||||
padding: 0 24px;
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
|
||||
@@ -75,7 +75,7 @@ export default {
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.$instance.post(`/app/partyOrganization/queryPartyOrganizationListByName?name=${this.name}`).then((res) => {
|
||||
this.$instance.post(`/app/partyOrganization/queryPartyOrganizationListByName`).then((res) => {
|
||||
if(res?.data) {
|
||||
this.showHistory = false
|
||||
this.list = res.data
|
||||
|
||||
Reference in New Issue
Block a user