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