居民档案
This commit is contained in:
@@ -48,127 +48,125 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapState} from 'vuex'
|
import {mapState} from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppResidentDocument',
|
name: 'AppResidentDocument',
|
||||||
appName: '居民管理',
|
appName: '居民管理',
|
||||||
components: {},
|
|
||||||
props: {},
|
data () {
|
||||||
data() {
|
return {
|
||||||
return {
|
keyword: '',
|
||||||
keyword: '',
|
datas: [],
|
||||||
datas: [],
|
current: 1,
|
||||||
current: 1,
|
size: 20,
|
||||||
size: 20,
|
tabList: [
|
||||||
tabList: [
|
{
|
||||||
{
|
name: '本地居民',
|
||||||
name: '本地居民',
|
},
|
||||||
},
|
{
|
||||||
{
|
name: '流动人员',
|
||||||
name: '流动人员',
|
},
|
||||||
},
|
],
|
||||||
],
|
currentTabs: 0,
|
||||||
currentTabs: 0,
|
areaId: '',
|
||||||
areaId: '',
|
isMore: false,
|
||||||
isMore: false,
|
areaName: ''
|
||||||
areaName: ''
|
}
|
||||||
}
|
},
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['user']),
|
...mapState(['user']),
|
||||||
},
|
},
|
||||||
watch: {},
|
|
||||||
onLoad() {
|
onLoad () {
|
||||||
this.areaId = this.user.areaId
|
this.areaId = this.user.areaId
|
||||||
this.areaName = this.user.areaName
|
this.areaName = this.user.areaName
|
||||||
this.getList()
|
|
||||||
uni.$on('reload', res => {
|
|
||||||
this.current = 1
|
|
||||||
this.getList()
|
this.getList()
|
||||||
})
|
uni.$on('reload', res => {
|
||||||
},
|
this.current = 1
|
||||||
onShow() {
|
this.getList()
|
||||||
document.title = '居民管理'
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getList() {
|
|
||||||
this.$loading()
|
|
||||||
this.$http.post('/app/appresident/list', null, {
|
|
||||||
params: {
|
|
||||||
size: this.size,
|
|
||||||
current: this.current,
|
|
||||||
con: this.keyword,
|
|
||||||
residentType: this.currentTabs == 0 ? '0' : '1',
|
|
||||||
}
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
|
|
||||||
|
|
||||||
this.pages = res.data.pages
|
|
||||||
|
|
||||||
if (this.current === 1 && !res.data.records.length) {
|
|
||||||
this.isMore = true
|
|
||||||
} else {
|
|
||||||
this.isMore = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
change(index) {
|
methods: {
|
||||||
this.isMore = false
|
getList() {
|
||||||
this.currentTabs = index
|
this.$loading()
|
||||||
this.current = 1
|
this.$http.post('/app/appresident/list', null, {
|
||||||
this.datas = []
|
params: {
|
||||||
this.getList()
|
size: this.size,
|
||||||
},
|
current: this.current,
|
||||||
|
con: this.keyword,
|
||||||
toDetailCard(item) {
|
residentType: this.currentTabs == 0 ? '0' : '1',
|
||||||
uni.navigateTo({url: `./DetailCard?id=${item.id}`})
|
}
|
||||||
},
|
}).then((res) => {
|
||||||
|
|
||||||
seachObj(e) {
|
|
||||||
this.areaId = e
|
|
||||||
this.current = 1
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
|
|
||||||
handerSearch(e) {
|
|
||||||
this.keyword = e
|
|
||||||
this.current = 1
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
|
|
||||||
handerClear() {
|
|
||||||
this.keyword = ''
|
|
||||||
this.current = 1
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
edit(id) {
|
|
||||||
uni.navigateTo({url: `./Add?id=${id}&type=${this.currentTabs}`})
|
|
||||||
},
|
|
||||||
del(id) {
|
|
||||||
this.$confirm('确定删除该数据?').then(() => {
|
|
||||||
uni.showLoading()
|
|
||||||
this.$http.post(`/app/appresident/delete?ids=${id}`).then((res) => {
|
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$u.toast('删除成功!')
|
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
|
||||||
this.current = 1
|
|
||||||
this.getList()
|
this.pages = res.data.pages
|
||||||
|
|
||||||
|
if (this.current === 1 && !res.data.records.length) {
|
||||||
|
this.isMore = true
|
||||||
|
} else {
|
||||||
|
this.isMore = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
uni.hideLoading()
|
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
},
|
||||||
})
|
|
||||||
}
|
change(index) {
|
||||||
},
|
this.isMore = false
|
||||||
onReachBottom() {
|
this.currentTabs = index
|
||||||
console.log("reachBottom")
|
this.current = 1
|
||||||
this.current++
|
this.datas = []
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
}
|
|
||||||
|
toDetailCard(item) {
|
||||||
|
uni.navigateTo({url: `./DetailCard?id=${item.id}`})
|
||||||
|
},
|
||||||
|
|
||||||
|
seachObj(e) {
|
||||||
|
this.areaId = e
|
||||||
|
this.current = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
|
handerSearch(e) {
|
||||||
|
this.keyword = e
|
||||||
|
this.current = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
|
handerClear() {
|
||||||
|
this.keyword = ''
|
||||||
|
this.current = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
edit(id) {
|
||||||
|
uni.navigateTo({url: `./Add?id=${id}&type=${this.currentTabs}`})
|
||||||
|
},
|
||||||
|
del(id) {
|
||||||
|
this.$confirm('确定删除该数据?').then(() => {
|
||||||
|
uni.showLoading()
|
||||||
|
this.$http.post(`/app/appresident/delete?ids=${id}`).then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$u.toast('删除成功!')
|
||||||
|
this.current = 1
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
uni.hideLoading()
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
console.log("reachBottom")
|
||||||
|
this.current++
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="DetailCard" v-if="pageShow">
|
<div class="DetailCard" v-if="pageShow">
|
||||||
<div class="top"></div>
|
|
||||||
<div class="middle">
|
<div class="middle">
|
||||||
<div class="hint">家庭地址</div>
|
<div class="hint">家庭地址</div>
|
||||||
<div class="areaHint">
|
<div class="areaHint">
|
||||||
|
|||||||
@@ -198,9 +198,19 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 14px 0;
|
padding: 14px 0;
|
||||||
|
|
||||||
.phones {
|
.phones {
|
||||||
color: #3d94fb;
|
color: #3d94fb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span:first-child {
|
||||||
|
flex-shrink: 1;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
span:last-child {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user