+
+
-
张三
-
黔西南公安局
+
{{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);
+ }
+ })
+ }
},
}