diff --git a/src/project/saas/AppResidentDocument/AppResidentDocument.vue b/src/project/saas/AppResidentDocument/AppResidentDocument.vue index e7f06e70..633ca9c5 100644 --- a/src/project/saas/AppResidentDocument/AppResidentDocument.vue +++ b/src/project/saas/AppResidentDocument/AppResidentDocument.vue @@ -16,26 +16,34 @@
-
@@ -72,7 +80,21 @@
currentTabs: 0,
areaId: '',
isMore: false,
- areaName: ''
+ areaName: '',
+ options: [
+ {
+ text: '编辑',
+ style: {
+ backgroundColor: '#007aff'
+ }
+ },
+ {
+ text: '删除',
+ style: {
+ backgroundColor: '#dd524d'
+ }
+ }
+ ]
}
},
@@ -84,13 +106,31 @@
this.areaId = this.user.areaId
this.areaName = this.user.areaName
this.getList()
- uni.$on('reload', res => {
+ uni.$on('reload', () => {
this.current = 1
this.getList()
})
},
methods: {
+ onClick (index, i) {
+ if (i == 1) {
+ this.del(this.datas[index].id)
+ } else {
+ this.datas[index].show = false
+ this.edit(this.datas[index].id)
+ }
+ },
+
+ onOpen (index) {
+ this.datas[index].show = true
+ this.datas.map((val, i) => {
+ if(index != i) {
+ this.datas[i].show = false
+ }
+ })
+ },
+
getList() {
this.$loading()
this.$http.post('/app/appresident/list', null, {
@@ -102,7 +142,17 @@
}
}).then((res) => {
if (res.code == 0) {
- this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
+ this.datas = this.current > 1 ? [...this.datas, ...res.data.records.map(v => {
+ return {
+ ...v,
+ show: false
+ }
+ })] : res.data.records.map(v => {
+ return {
+ ...v,
+ show: false
+ }
+ })
this.pages = res.data.pages