四邻
This commit is contained in:
@@ -68,7 +68,11 @@ export default {
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.$dict.load('partyFourLinkageStatus')
|
this.$dict.load('partyFourLinkageStatus')
|
||||||
|
uni.$on('update', ()=>{
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.getUserInfo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
search(e) {
|
search(e) {
|
||||||
@@ -98,7 +102,7 @@ export default {
|
|||||||
this.list = this.current==1? res.data.records : [...this.list, ...res.data.records]
|
this.list = this.current==1? res.data.records : [...this.list, ...res.data.records]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.current ++,
|
this.current ++,
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
|
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div><span>*</span>四邻对象</div>
|
<div><span>*</span>四邻对象</div>
|
||||||
<AiSelect class="right" v-model="form.type" dict="agriculturalType"/>
|
<AiSelect class="right" v-model="form.id" :list="userList"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div><span>*</span>事件日期</div>
|
<div><span>*</span>事件日期</div>
|
||||||
<div @click="isShowDate = true">
|
<div @click="isShowDate = true">
|
||||||
<span v-if="form.checkTime" >{{ form.checkTime }}</span>
|
<span v-if="form.linksageDate" >{{ form.linksageDate }}</span>
|
||||||
<span v-else style="color: #999;">请选择</span>
|
<span v-else style="color: #999;">请选择</span>
|
||||||
<u-icon name="arrow-right" color="#ddd"/>
|
<u-icon name="arrow-right" color="#ddd"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -19,9 +19,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="title"><span style="color: #FF4466">*</span>事件描述</div>
|
<div class="title"><span style="color: #FF4466">*</span>事件描述</div>
|
||||||
<div>
|
<div>
|
||||||
<u-input type="textarea" v-model="form.name" placeholder="请输入事件内容描述" height="200" maxlength="500"/>
|
<u-input type="textarea" v-model="form.description" placeholder="请输入事件内容描述" height="200" maxlength="500"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="tips">{{form.name.length}}/500</div>
|
<div class="tips">{{form.description.length}}/500</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
@@ -44,37 +44,55 @@ export default {
|
|||||||
},
|
},
|
||||||
isShowDate: false,
|
isShowDate: false,
|
||||||
form: {
|
form: {
|
||||||
type: '',
|
id: '',
|
||||||
checkTime: '',
|
linksageDate: '',
|
||||||
name: '',
|
description: '',
|
||||||
partyId: ''
|
|
||||||
},
|
},
|
||||||
userList: []
|
userList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.$dict.load('agriculturalType')
|
this.$dict.load('agriculturalType')
|
||||||
this.getFourResident()
|
this.getUserList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onDateChange(e) {
|
onDateChange(e) {
|
||||||
this.form.checkTime = `${e.year}-${e.month}-${e.day}`
|
this.form.linksageDate = `${e.year}-${e.month}-${e.day}`
|
||||||
},
|
},
|
||||||
getFourResident() {
|
getUserList() {
|
||||||
this.$instance.post('/app/apppartyfourresident/listFourResident', null, {
|
this.$instance.post('/app/apppartyfourresident/listFourResidentByApplet').then((res) => {
|
||||||
params: {
|
if(res?.data) {
|
||||||
size: 10,
|
res.data.map((item) => {
|
||||||
partyId: this.form.partyId,
|
this.userList.push({
|
||||||
},
|
label: item.name,
|
||||||
}).then((res) => {
|
value: item.id,
|
||||||
if (res.code == 0) {
|
})
|
||||||
this.userList = res.data.records
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
if(!this.form.checkTime)
|
if(!this.form.id) {
|
||||||
this.$instance.post('/app/apppartyfourlinkage/addOrUpdate')
|
return this.$u.toast('请选择四邻对象')
|
||||||
|
}
|
||||||
|
if(!this.form.linksageDate) {
|
||||||
|
return this.$u.toast('请选择事件日期')
|
||||||
|
}
|
||||||
|
if(!this.form.description) {
|
||||||
|
return this.$u.toast('请输入事件描述')
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$instance.post('/app/apppartyfourlinkage/addOrUpdate',{
|
||||||
|
...this.form
|
||||||
|
}).then(res => {
|
||||||
|
if(res.code == 0) {
|
||||||
|
this.$u.toast('添加联动记录成功')
|
||||||
|
uni.$emit('update')
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
},600)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="familyInfo">
|
<div class="familyInfo">
|
||||||
<div class="card-list">
|
<div class="card-list">
|
||||||
<div class="item" @click="$linkTo('./memberInfo')">
|
<div class="item" v-for="(item, index) in familyList" :key="index" @click="$linkTo(`./memberInfo?id=${item.id}`)">
|
||||||
<div class="userpic">
|
<div class="userpic">
|
||||||
<img src="../static/avatar.png" alt="">
|
<img src="../static/avatar.png" alt="" v-if="item.photo">
|
||||||
|
<img src="../static/avatar.png" alt="" v-else>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-info">
|
<div class="user-info">
|
||||||
<p class="name">李白</p>
|
<p class="name">{{ item.name }}</p>
|
||||||
<div class="idNumber">42068219980502252x</div>
|
<div class="idNumber">{{ item.idNumber.replace(/(.{6}).*(.{4})/, '$1********$2') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="relation">
|
<div class="relation" :style="{color:item.householdRelation == 11? '#4181FF' : '#999999' }">
|
||||||
户主
|
{{ $dict.getLabel('householdRelation',item.householdRelation) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="arrowRoght">
|
<div class="arrowRoght">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
@@ -25,11 +26,29 @@ export default {
|
|||||||
name: 'familyInfo',
|
name: 'familyInfo',
|
||||||
appName: '家庭详情',
|
appName: '家庭详情',
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {
|
||||||
|
idNumber: '',
|
||||||
|
familyList: {},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onLoad(o) {
|
||||||
// document.title('家庭详情')
|
this.$dict.load('householdRelation')
|
||||||
|
this.idNumber = o.idNumber
|
||||||
|
this.getList()
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
getList() {
|
||||||
|
this.$instance.post('/app/appresident/queryHomeMember',null,{
|
||||||
|
params: {
|
||||||
|
idNumber: this.idNumber
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if(res.code == 0) {
|
||||||
|
this.familyList = res.data.family
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="myNeighborInfo">
|
<div class="myNeighborInfo">
|
||||||
<div class="card-list">
|
<div class="card-list">
|
||||||
<div class="item" @click="$linkTo('./familyInfo')">
|
<div class="item" v-for="(item,index) in userList" :key="index" @click="$linkTo(`./familyInfo?idNumber=${item.idNumber}`)">
|
||||||
<div class="userpic">
|
<div class="userpic">
|
||||||
<img src="../static/avatar.png" alt="">
|
<img :src="item.avatarUrl" v-if="item.avatarUrl" alt="">
|
||||||
|
<img src="../static/avatar.png" v-else alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="user-info">
|
<div class="user-info">
|
||||||
<p class="name">李白</p>
|
<p class="name">{{ item.name }}</p>
|
||||||
<div class="idNumber">42068219980502252x</div>
|
<div class="idNumber">{{ item.idNumber.replace(/(.{6}).*(.{4})/, '$1********$2') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="arrowRoght">
|
<div class="arrowRoght">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
@@ -20,7 +21,26 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'myNeighborInfo',
|
name: 'myNeighborInfo',
|
||||||
appName: '我的四邻信息'
|
appName: '我的四邻信息',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
partyId: '',
|
||||||
|
userList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getUserInfo()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 我的四邻党员查询
|
||||||
|
getUserInfo() {
|
||||||
|
this.$instance.post('/app/apppartyfourresident/listFourResidentByApplet').then((res) => {
|
||||||
|
if(res?.data) {
|
||||||
|
this.userList = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -36,6 +56,7 @@ export default {
|
|||||||
padding: 32px;
|
padding: 32px;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.04);
|
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.04);
|
||||||
|
margin-bottom: 24px;
|
||||||
.userpic {
|
.userpic {
|
||||||
width: 96px;
|
width: 96px;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ export default {
|
|||||||
this.$instance.post(`/app/apppartyfourlinkage/delete?ids=${this.id}`).then(res => {
|
this.$instance.post(`/app/apppartyfourlinkage/delete?ids=${this.id}`).then(res => {
|
||||||
if(res.code == 0) {
|
if(res.code == 0) {
|
||||||
this.$u.toast('删除成功')
|
this.$u.toast('删除成功')
|
||||||
|
uni.$emit('update')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
},600)
|
},600)
|
||||||
|
|||||||
Reference in New Issue
Block a user