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