diff --git a/src/project/qianxinan/AppGirdIntegral/AppGirdIntegral.vue b/src/project/qianxinan/AppGirdIntegral/AppGirdIntegral.vue index 7aa975e1..1d3ea5e5 100644 --- a/src/project/qianxinan/AppGirdIntegral/AppGirdIntegral.vue +++ b/src/project/qianxinan/AppGirdIntegral/AppGirdIntegral.vue @@ -6,15 +6,15 @@

个人积分

-

297

+

{{totalInfo['积分余额']}}

-

个人积分

-
97
+

累计获取积分

+
{{totalInfo['累计获取积分']}}

积分排名

-
97
+
{{totalInfo['积分排行']}}
@@ -23,14 +23,14 @@
积分明细
-
+
-

完善居民信息

-
2022-08-18 13:45:36
+

{{item.eventDesc}}

+
{{item.createTime}}
-
+20
+
{{item.scoreCalcType == 1 ? '-' : '+'}}{{item.changeScore}}
- +
@@ -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() } } diff --git a/src/project/qianxinan/AppPointsRanking/AppPointsRanking.vue b/src/project/qianxinan/AppPointsRanking/AppPointsRanking.vue index 9b6cf43c..1d3369d5 100644 --- a/src/project/qianxinan/AppPointsRanking/AppPointsRanking.vue +++ b/src/project/qianxinan/AppPointsRanking/AppPointsRanking.vue @@ -6,28 +6,31 @@
-
+
- - + + {{index+1}}
- 李毅 + {{item.name}}
-
50
+
{{item.score}}
+
+ +
@@ -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; + } + } } diff --git a/src/project/qianxinan/AppPointsRanking/img/top0.png b/src/project/qianxinan/AppPointsRanking/img/top0.png new file mode 100644 index 00000000..5c2e5bf0 Binary files /dev/null and b/src/project/qianxinan/AppPointsRanking/img/top0.png differ diff --git a/src/project/qianxinan/AppPointsRanking/img/top1.png b/src/project/qianxinan/AppPointsRanking/img/top1.png index 5c2e5bf0..ce3c9b90 100644 Binary files a/src/project/qianxinan/AppPointsRanking/img/top1.png and b/src/project/qianxinan/AppPointsRanking/img/top1.png differ diff --git a/src/project/qianxinan/AppPointsRanking/img/top2.png b/src/project/qianxinan/AppPointsRanking/img/top2.png index ce3c9b90..662c6264 100644 Binary files a/src/project/qianxinan/AppPointsRanking/img/top2.png and b/src/project/qianxinan/AppPointsRanking/img/top2.png differ diff --git a/src/project/qianxinan/AppPointsRanking/img/top3.png b/src/project/qianxinan/AppPointsRanking/img/top3.png deleted file mode 100644 index 662c6264..00000000 Binary files a/src/project/qianxinan/AppPointsRanking/img/top3.png and /dev/null differ diff --git a/src/project/qianxinan/AppResidentsType/AppResidentsType.vue b/src/project/qianxinan/AppResidentsType/AppResidentsType.vue index b90fc9c7..f589cb2a 100644 --- a/src/project/qianxinan/AppResidentsType/AppResidentsType.vue +++ b/src/project/qianxinan/AppResidentsType/AppResidentsType.vue @@ -3,15 +3,15 @@
-

5

+

{{totalInfo['登记'] || 0}}

登记

-

5

+

{{totalInfo['朋友'] || 0}}

朋友

-

5

+

{{totalInfo['知己'] || 0}}

知己

@@ -32,7 +32,7 @@ - + {{deptList[0].name}} 部门 @@ -40,43 +40,28 @@
-
-
+
+
-

张三

-

黔西南公安局

+

{{item.name}}

+

{{item.departmentName}}

-
2020-12-11
+
{{item.createTime.substring(0,10)}}
- 登记:5 - 朋友:5 - 知己:5 -
-
-
-
-
- -
-

张三

-

黔西南公安局

-
-
-
2020-12-11
-
-
- 登记:5 - 朋友:5 - 知己:5 + 登记:{{item.registerCount}} + 朋友:{{item.friendCount}} + 知己:{{item.confidantCount}}
-
+ + +
添加居民数据
@@ -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() + } } diff --git a/src/project/qianxinan/AppUpdateNum/AppUpdateNum.vue b/src/project/qianxinan/AppUpdateNum/AppUpdateNum.vue index e92d9d44..5894f950 100644 --- a/src/project/qianxinan/AppUpdateNum/AppUpdateNum.vue +++ b/src/project/qianxinan/AppUpdateNum/AppUpdateNum.vue @@ -3,22 +3,22 @@
*居民登记
- +
*居民朋友
- +
*居民知己
- +
-
+
提交
@@ -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); + } + }) + } }, }