Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -6,15 +6,15 @@
|
||||
<img src="./img/header-top.png" alt="" class="header-top-img" />
|
||||
<div class="header-content">
|
||||
<p class="text">个人积分</p>
|
||||
<h2>297</h2>
|
||||
<h2>{{totalInfo['积分余额']}}</h2>
|
||||
<div class="flex">
|
||||
<div class="flex-item">
|
||||
<p class="text">个人积分</p>
|
||||
<div>97</div>
|
||||
<p class="text">累计获取积分</p>
|
||||
<div>{{totalInfo['累计获取积分']}}</div>
|
||||
</div>
|
||||
<div class="flex-item">
|
||||
<p class="text">积分排名</p>
|
||||
<div>97</div>
|
||||
<div>{{totalInfo['积分排行']}}</div>
|
||||
</div>
|
||||
<span class="border-line"></span>
|
||||
</div>
|
||||
@@ -23,14 +23,14 @@
|
||||
</AiTopFixed>
|
||||
<div class="list-data">
|
||||
<div class="title">积分明细</div>
|
||||
<div class="item">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="flex-left">
|
||||
<p>完善居民信息</p>
|
||||
<div>2022-08-18 13:45:36</div>
|
||||
<p>{{item.eventDesc}}</p>
|
||||
<div>{{item.createTime}}</div>
|
||||
</div>
|
||||
<div class="flex-right status0">+20</div>
|
||||
<div class="flex-right" :class="`status${item.scoreCalcType}`">{{item.scoreCalcType == 1 ? '-' : '+'}}{{item.changeScore}}</div>
|
||||
</div>
|
||||
<!-- <AiEmpty v-if="!list.length"></AiEmpty> -->
|
||||
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -44,6 +44,7 @@
|
||||
return {
|
||||
current: 1,
|
||||
list: [],
|
||||
totalInfo: {}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -52,42 +53,39 @@
|
||||
},
|
||||
|
||||
created() {
|
||||
this.$dict.load("workTaskType").then(() => {
|
||||
this.getList()
|
||||
})
|
||||
uni.$on('getList', () => {
|
||||
this.current = 1
|
||||
this.getList()
|
||||
})
|
||||
this.getList()
|
||||
this.getTotal()
|
||||
},
|
||||
|
||||
onShow() {
|
||||
document.title = '网格员积分'
|
||||
this.current = 1
|
||||
this.getList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.$http.post("/app/appworktaskinfo/list", null, {
|
||||
this.$http.post("/app/appscoredetail/list", null, {
|
||||
params: {
|
||||
...this.map(this.index),
|
||||
size: 10,
|
||||
current: this.current
|
||||
}
|
||||
}).then(res => {
|
||||
if (res && res.data) {
|
||||
if (this.current > 1 && this.current > res.data.pages) {
|
||||
this.status = "已经到底啦"
|
||||
}
|
||||
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
getTotal() {
|
||||
this.$http.post(`/app/appscoredetail/myScore`).then(res=> {
|
||||
if(res?.data) {
|
||||
this.totalInfo = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
this.current = this.current + 1;
|
||||
this.current++
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,28 +6,31 @@
|
||||
</u-tabs>
|
||||
</AiTopFixed>
|
||||
<div class="list-data">
|
||||
<div class="item">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="flex-left">
|
||||
<div class="item-rank">
|
||||
<img src="./img/top1.png" alt="">
|
||||
<!-- <span>4</span> -->
|
||||
<img :src="imgList[index]" alt="" v-if="index < 3">
|
||||
<span v-else>{{index+1}}</span>
|
||||
</div>
|
||||
<div class="item-user">
|
||||
<img src="./img/top1.png" alt="">李毅
|
||||
<img :src="item.avatar" alt="">{{item.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-right">50</div>
|
||||
<div class="flex-right">{{item.score}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty description="暂无数据" v-if="!list.length"/>
|
||||
<div class="list-data footer" v-if="currentTabs<1">
|
||||
<div class="item">
|
||||
<div class="flex-left">
|
||||
<div class="item-rank">
|
||||
<span>4</span>
|
||||
<span>{{userNum}}</span>
|
||||
</div>
|
||||
<div class="item-user">
|
||||
<img src="./img/top1.png" alt="">李毅
|
||||
<img :src="userRank.avatar" alt="">{{userRank.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-right">50</div>
|
||||
<div class="flex-right">{{userRank.score}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -39,7 +42,6 @@
|
||||
appName: '积分排行',
|
||||
data() {
|
||||
return {
|
||||
current: 1,
|
||||
list: [],
|
||||
currentTabs: 0,
|
||||
tabList: [
|
||||
@@ -64,6 +66,9 @@
|
||||
'font-weight' : '400',
|
||||
'color': '#000000'
|
||||
},
|
||||
imgList: [require('./img/top0.png'),require('./img/top1.png'),require('./img/top2.png')],
|
||||
userRank: {},
|
||||
userNum: ''
|
||||
}
|
||||
},
|
||||
|
||||
@@ -72,13 +77,8 @@
|
||||
},
|
||||
|
||||
created() {
|
||||
// this.$dict.load("workTaskType").then(() => {
|
||||
// this.getList()
|
||||
// })
|
||||
// uni.$on('getList', () => {
|
||||
// this.current = 1
|
||||
// this.getList()
|
||||
// })
|
||||
this.getRanking()
|
||||
this.getUserRank()
|
||||
},
|
||||
|
||||
onShow() {
|
||||
@@ -88,7 +88,29 @@
|
||||
methods: {
|
||||
change(index) {
|
||||
this.currentTabs = index
|
||||
// this.getListInit()
|
||||
this.getRanking()
|
||||
},
|
||||
getRanking() {
|
||||
this.$http.post(`/app/appscoredetail/scoreRanking?type=${this.currentTabs}&size=100`).then(res=> {
|
||||
if(res?.data) {
|
||||
this.list = res.data.records
|
||||
this.list.map((item) => {
|
||||
if(this.user.phone == item.phone) {
|
||||
this.userRank = {...item}
|
||||
}
|
||||
})
|
||||
if(this.currentTabs<1) {
|
||||
this.getUserRank()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getUserRank() {
|
||||
this.$http.post(`/app/appscoredetail/myScore`).then(res=> {
|
||||
if(res?.data) {
|
||||
this.userNum = res.data['积分排行']
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -160,5 +182,16 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.footer {
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
.item {
|
||||
border-radius: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
BIN
src/project/qianxinan/AppPointsRanking/img/top0.png
Normal file
BIN
src/project/qianxinan/AppPointsRanking/img/top0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.7 KiB |
@@ -3,15 +3,15 @@
|
||||
<AiTopFixed>
|
||||
<div class="top-num">
|
||||
<div class="item-num">
|
||||
<h3>5</h3>
|
||||
<h3>{{totalInfo['登记'] || 0}}</h3>
|
||||
<p>登记</p>
|
||||
</div>
|
||||
<div class="item-num">
|
||||
<h3>5</h3>
|
||||
<h3>{{totalInfo['朋友'] || 0}}</h3>
|
||||
<p>朋友</p>
|
||||
</div>
|
||||
<div class="item-num">
|
||||
<h3>5</h3>
|
||||
<h3>{{totalInfo['知己'] || 0}}</h3>
|
||||
<p>知己</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -32,7 +32,7 @@
|
||||
<!-- <div v-if="deptId" class="gateway-name">{{deptName || '部门'}}</div>
|
||||
<u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" v-if="deptId" />
|
||||
<span v-else>部门<u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" /></span> -->
|
||||
<AiPagePicker type="dept" :selected.sync="deptList" single nodeKey="id">
|
||||
<AiPagePicker type="dept" :selected.sync="deptList" single nodeKey="id" @select="getListInit">
|
||||
<span class="label" v-if="deptList.length">{{deptList[0].name}}</span>
|
||||
<span v-else>部门</span>
|
||||
<u-icon name="arrow-down" color="#666" size="28" style="margin-left:4px;"/>
|
||||
@@ -40,43 +40,28 @@
|
||||
</div>
|
||||
</div>
|
||||
</AiTopFixed>
|
||||
<div class="user-list">
|
||||
<div class="item">
|
||||
<div class="user-list" v-if="list.length">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="item-top">
|
||||
<div class="item-left">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/user-icon.png"/>
|
||||
<div>
|
||||
<h4>张三</h4>
|
||||
<p>黔西南公安局</p>
|
||||
<h4>{{item.name}}</h4>
|
||||
<p>{{item.departmentName}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-right">2020-12-11</div>
|
||||
<div class="item-right">{{item.createTime.substring(0,10)}}</div>
|
||||
</div>
|
||||
<div class="item-bottom">
|
||||
登记:<span>5</span>
|
||||
朋友:<span>5</span>
|
||||
知己:<span>5</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item-top">
|
||||
<div class="item-left">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/user-icon.png"/>
|
||||
<div>
|
||||
<h4>张三</h4>
|
||||
<p>黔西南公安局</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-right">2020-12-11</div>
|
||||
</div>
|
||||
<div class="item-bottom">
|
||||
登记:<span>5</span>
|
||||
朋友:<span>5</span>
|
||||
知己:<span>5</span>
|
||||
登记:<span>{{item.registerCount}}</span>
|
||||
朋友:<span>{{item.friendCount}}</span>
|
||||
知己:<span>{{item.confidantCount}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="add-btn">
|
||||
<AiEmpty description="暂无数据" v-else/>
|
||||
|
||||
<div class="add-btn" @click="toUpdateNum()">
|
||||
<div>添加居民数据</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -93,7 +78,8 @@
|
||||
keyword: '',
|
||||
areaId: '',
|
||||
areaName: '',
|
||||
deptList: []
|
||||
deptList: [],
|
||||
totalInfo: {}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -102,13 +88,10 @@
|
||||
},
|
||||
|
||||
created() {
|
||||
// this.$dict.load("workTaskType").then(() => {
|
||||
// this.getList()
|
||||
// })
|
||||
// uni.$on('getList', () => {
|
||||
// this.current = 1
|
||||
// this.getList()
|
||||
// })
|
||||
uni.$on('update', () => {
|
||||
this.getTotal()
|
||||
this.getListInit()
|
||||
})
|
||||
this.getTotal()
|
||||
this.getListInit()
|
||||
},
|
||||
@@ -124,30 +107,29 @@
|
||||
},
|
||||
areaSelect(e) {
|
||||
this.areaId =e
|
||||
// this.$nextTick(() => {
|
||||
// this.getListInit()
|
||||
// })
|
||||
// this.getTotal()
|
||||
this.$nextTick(() => {
|
||||
this.getListInit()
|
||||
})
|
||||
},
|
||||
clearDept() {
|
||||
this.deptList = []
|
||||
this.getListInit()
|
||||
},
|
||||
getTotal() {
|
||||
this.$http.post(`/appwxuserfamiliarityrate/wxTopStatistics`).then(res=> {
|
||||
this.$http.post(`/app/appwxuserfamiliarityrate/wxTopStatistics`).then(res=> {
|
||||
if(res?.data) {
|
||||
|
||||
this.totalInfo = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.$http.post(`/appwxuserfamiliarityrate/list`, null, {
|
||||
this.$http.post(`/app/appwxuserfamiliarityrate/list`, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
// taskTitle: this.taskTitle,
|
||||
// startTime: this.start,
|
||||
// endTime: this.end,
|
||||
// createUserId: this.createUserId,
|
||||
size: 10,
|
||||
areaId: this.areaId,
|
||||
departmentId: this.deptList.length ? this.deptList[0].id : '',
|
||||
name: this.keyword,
|
||||
}
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
@@ -155,7 +137,14 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
toUpdateNum() {
|
||||
uni.navigateTo({url: '../AppUpdateNum/AppUpdateNum'})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current++
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips">*</span>居民登记</span>
|
||||
<div class="value">
|
||||
<u-input type="number" placeholder="请填写数量 " v-model="num" input-align="right" placeholder-style="color:#999;font-size:15px;" height="42" :maxlength="10" :clearable="false" />
|
||||
<u-input type="number" placeholder="请填写数量 " v-model="form.registerCount" input-align="right" placeholder-style="color:#999;font-size:15px;" height="42" :maxlength="10" :clearable="false" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips">*</span>居民朋友</span>
|
||||
<div class="value">
|
||||
<u-input type="number" placeholder="请填写数量 " v-model="num" input-align="right" placeholder-style="color:#999;font-size:15px;" height="42" :maxlength="10" :clearable="false" />
|
||||
<u-input type="number" placeholder="请填写数量 " v-model="form.friendCount" input-align="right" placeholder-style="color:#999;font-size:15px;" height="42" :maxlength="10" :clearable="false" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips">*</span>居民知己</span>
|
||||
<div class="value">
|
||||
<u-input type="number" placeholder="请填写数量 " v-model="num" input-align="right" placeholder-style="color:#999;font-size:15px;" height="42" :maxlength="10" :clearable="false" />
|
||||
<u-input type="number" placeholder="请填写数量 " v-model="form.confidantCount" input-align="right" placeholder-style="color:#999;font-size:15px;" height="42" :maxlength="10" :clearable="false" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="add-btn">
|
||||
<div class="add-btn" @click="submit()">
|
||||
<div>提交</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,7 +30,11 @@
|
||||
appName: '更新居民数据',
|
||||
data() {
|
||||
return {
|
||||
num: ''
|
||||
form: {
|
||||
registerCount: 0,
|
||||
friendCount: 0,
|
||||
confidantCount: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -38,10 +42,37 @@
|
||||
},
|
||||
onShow() {
|
||||
document.title = '更新居民数据'
|
||||
this.getTotal()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
getTotal() {
|
||||
this.$http.post(`/app/appwxuserfamiliarityrate/wxTopStatistics`).then(res=> {
|
||||
if(res?.data) {
|
||||
this.form = {...res.data}
|
||||
}
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
if(!/^[0-9]+$/.test(this.form.registerCount)){
|
||||
return this.$u.toast(`居民登记请输入正整数`)
|
||||
}
|
||||
if(!/^[0-9]+$/.test(this.form.friendCount)){
|
||||
return this.$u.toast(`居民朋友请输入正整数`)
|
||||
}
|
||||
if(!/^[0-9]+$/.test(this.form.confidantCount)){
|
||||
return this.$u.toast(`居民知己请输入正整数`)
|
||||
}
|
||||
this.$http.post(`/app/appwxuserfamiliarityrate/wxcpAdd`, this.form).then(res=> {
|
||||
if(res.code == 0) {
|
||||
uni.$emit('update')
|
||||
this.$u.toast(`居民数据更新成功`)
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 600);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user