From e2d99bedd42fd725bbf767a81ee36e0f05b88106 Mon Sep 17 00:00:00 2001
From: shijingjing <1789544664@qq.com>
Date: Fri, 22 Jul 2022 09:45:14 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/apps/AppHelpEffect/AppHelpEffect.vue | 31 +++----
src/apps/AppHelpEffect/addLog.vue | 3 -
src/apps/AppHelpEffect/helpDetail.vue | 103 ++++++++---------------
3 files changed, 49 insertions(+), 88 deletions(-)
diff --git a/src/apps/AppHelpEffect/AppHelpEffect.vue b/src/apps/AppHelpEffect/AppHelpEffect.vue
index e19b7923..224c1792 100644
--- a/src/apps/AppHelpEffect/AppHelpEffect.vue
+++ b/src/apps/AppHelpEffect/AppHelpEffect.vue
@@ -24,21 +24,22 @@
-
-
- {{ item.name }}
- {{ $dict.getLabel('fpHouseType', item.houseType) }}
-
-
{{ item.idNumber.replace(/(.{6}).*(.{4})/, '$1********$2') }}
-

{{ item.phone}}
-

- {{ item.countyName + item.townName + item.villageName }}{{ item.currentAddress || '' }}
+
+
+
+ {{ item.name }}
+ {{ $dict.getLabel('fpHouseType', item.houseType) }}
+
+
{{ item.idNumber.replace(/(.{6}).*(.{4})/, '$1********$2') }}
+

{{ item.phone}}
+

+ {{ item.countyName + item.townName + item.villageName }}{{ item.currentAddress || '' }}
+
-
+
-
-
+
@@ -67,7 +68,6 @@ export default {
methods: {
areaSelect(e) {
- console.log(e);
this.areaId = e
this.current = 1
this.list = []
@@ -82,9 +82,10 @@ export default {
}
})
this.typeList.unshift({ label: '全部类型', value: ''})
+ this.areaId = this.user.areaId
+ this.getList()
})
- this.areaId = this.user.areaId
- this.getList()
+
},
typeSelect(v) {
this.current = 1
diff --git a/src/apps/AppHelpEffect/addLog.vue b/src/apps/AppHelpEffect/addLog.vue
index 5d43c26d..bee27801 100644
--- a/src/apps/AppHelpEffect/addLog.vue
+++ b/src/apps/AppHelpEffect/addLog.vue
@@ -72,9 +72,6 @@ export default {
if (!this.operationDesc) {
return this.$u.toast('请选择帮扶类型')
}
- // if (!this.detail) {
- // return this.$u.toast('请输入帮扶内容')
- // }
} else {
if (!this.detail) {
return this.$u.toast('请输入走访内容')
diff --git a/src/apps/AppHelpEffect/helpDetail.vue b/src/apps/AppHelpEffect/helpDetail.vue
index f49df3c7..1392c915 100644
--- a/src/apps/AppHelpEffect/helpDetail.vue
+++ b/src/apps/AppHelpEffect/helpDetail.vue
@@ -4,9 +4,9 @@
-
-
-
+
+
+
@@ -17,10 +17,12 @@
{{ item.createTime }}
-
+
+
-
帮扶措施:{{ $dict.getLabel('fpAssistanceMeasures',item.operationDesc) }}
+
帮扶措施:{{ $dict.getLabel('fpAssistanceMeasures',item.operationDesc) }}
+
操作类型:{{ item.operationDesc }}
{{ item.detail }}
-
-
-
-
-
-
-
-
-
- {{ item.createUserName.substr(item.createUserName.length - 2) }}
-
-
{{ item.createUserName }}
-
-
- {{ item.createTime }}
-
-
-
-
操作类型:{{ item.operationDesc }}
-
{{ item.detail }}
-
-
-
-
-
-
+
@@ -83,9 +59,9 @@ export default {
}
],
currentTabs: 0,
- helpList: [],
- logList: [],
+ list: [],
id: '',
+ current: 1,
}
},
computed: {
@@ -97,24 +73,22 @@ export default {
},
methods: {
change(index) {
+ this.list = []
+ this.current = 1
this.currentTabs = index
- if(index == 0) {
- this.getHelpList()
- } else if(index == 1) {
- this.getLogList()
- }
+ this.getList()
},
- getHelpList() {
- this.$http.post(`/app/apppreventionreturntopovertylog/list?pid=${this.id}&size=1000¤t=1&type=1`).then(res => {
- if (res.code === 0) {
- this.helpList = res.data.records || []
+ getList() {
+ this.$http.post(`/app/apppreventionreturntopovertylog/list`,null,{
+ params: {
+ pid: this.id,
+ size: 1000,
+ current: this.current,
+ type: this.currentTabs==0? '1':'0'
}
- })
- },
- getLogList() {
- this.$http.post(`/app/apppreventionreturntopovertylog/list?pid=${this.id}&size=1000¤t=1&type=0`).then(res => {
- if (res.code === 0) {
- this.logList = res.data.records || []
+ }).then(res => {
+ if (res?.data) {
+ this.list = this.current==1? res.data.records : [...this.list, ...res.data.records]
}
})
},
@@ -137,27 +111,23 @@ export default {
itemList: ['编辑', '删除'],
success: res => {
if (res.tapIndex === 0) {
- if (type === 0) {
+ if (type == 0) {
uni.navigateTo({
url: `./addLog?pid=${this.id}&id=${id}&type=0`
})
- } else {
+ } else if (type == 1) {
uni.navigateTo({
url: `./addLog?pid=${this.id}&id=${id}&type=1`
})
}
- } else if (res.tapIndex === 1) {
+ } else if (res.tapIndex == 1) {
this.$confirm('确定删除该数据?').then(() => {
uni.showLoading()
this.$http.post(`/app/apppreventionreturntopovertylog/delete?ids=${id}`).then(res => {
if (res.code === 0) {
this.$u.toast('删除成功')
- if(type == 1) {
- this.getHelpList()
- } else if(type == 0) {
- this.getLogList()
- }
+ this.getList()
}
uni.hideLoading()
})
@@ -167,24 +137,17 @@ export default {
}
})
},
-
-
-
-
-
-
-
},
onShow() {
document.title = '帮扶情况'
if(this.id) {
- if(this.currentTabs==0) {
- this.getHelpList()
- } else if (this.currentTabs ==1) {
- this.getLogList()
- }
-
+ this.getList()
}
+ this.getList()
+ },
+ onReachBottom() {
+ this.current ++
+ this.getList()
}
}