BUG 29485

This commit is contained in:
aixianling
2022-05-06 19:16:32 +08:00
parent 5ff3678971
commit 983e0b98b9

View File

@@ -9,7 +9,8 @@
<u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" /> <u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" />
</AiAreaPicker> </AiAreaPicker>
</div> --> </div> -->
<u-search v-model="value" placeholder:clearabled="true" placeholder="请输入姓名/身份证/手机号" :show-action="false" bg-color="#F5F5F5" search-icon-color="#999" color="#999" height="58" @search="getListInit" @clear="value='',getListInit"></u-search> <u-search v-model="value" placeholder:clearabled="true" placeholder="请输入姓名/身份证/手机号" :show-action="false" bg-color="#F5F5F5" search-icon-color="#999"
color="#999" height="58" @change="getListInit"/>
</div> </div>
<div class="userList" v-if="list.length"> <div class="userList" v-if="list.length">
<ul v-for="(item,index) in list" :key="index"> <ul v-for="(item,index) in list" :key="index">
@@ -26,11 +27,11 @@
</div> </div>
<div class="info"> <div class="info">
<div class="name"> <div class="name">
<span class="user-name">{{item.name}}</span> <span class="user-name">{{ item.name }}</span>
<span class="user-tel">{{item.phone}}</span> <span class="user-tel">{{ item.phone }}</span>
</div> </div>
<div class="idCard">{{item.idNumber && item.idNumber.replace(/^(\d{6})\d{8}(.{4}$)/g, `$1${Array(9).join('*')}$2`)}}</div> <div class="idCard">{{ item.idNumber && item.idNumber.replace(/^(\d{6})\d{8}(.{4}$)/g, `$1${Array(9).join('*')}$2`) }}</div>
<div class="address">{{item.currentAreaName || '' }}{{ item.currentAddress || '' }}</div> <div class="address">{{ item.currentAreaName || '' }}{{ item.currentAddress || '' }}</div>
</div> </div>
</div> </div>
</div> </div>
@@ -46,7 +47,8 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex' import {mapState} from 'vuex'
export default { export default {
data() { data() {
return { return {
@@ -57,13 +59,13 @@ export default {
userList: {}, userList: {},
userId: '', userId: '',
areaId: '', areaId: '',
areaName:'', areaName: '',
girdId: '' girdId: ''
} }
}, },
computed: { ...mapState(['user']) }, computed: {...mapState(['user'])},
methods: { methods: {
getList(){ getList() {
this.$http.post(`/app/appresident/list?householdName=1&current=${this.current}&con=${this.value}`).then((res) => { this.$http.post(`/app/appresident/list?householdName=1&current=${this.current}&con=${this.value}`).then((res) => {
if (res.code == 0) { if (res.code == 0) {
res.data.records.map((item) => { res.data.records.map((item) => {
@@ -75,7 +77,7 @@ export default {
} }
}) })
}, },
getListInit(){ getListInit() {
this.list = [] this.list = []
this.current = 1 this.current = 1
this.getList() this.getList()
@@ -86,7 +88,7 @@ export default {
confirm() { confirm() {
var checkUserList = [] var checkUserList = []
this.list.map((item) => { this.list.map((item) => {
if(item.checked) { if (item.checked) {
var info = { var info = {
girdMemberId: this.userId, girdMemberId: this.userId,
residentId: item.id, residentId: item.id,
@@ -96,10 +98,10 @@ export default {
checkUserList.push(info) checkUserList.push(info)
} }
}) })
if(!checkUserList.length) { if (!checkUserList.length) {
return this.$u.toast('请选择户主') return this.$u.toast('请选择户主')
} }
this.$http.post(`/app/appgirdmemberresident/add`, {residentList:checkUserList}).then((res) => { this.$http.post(`/app/appgirdmemberresident/add`, {residentList: checkUserList}).then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.$u.toast('提交成功') this.$u.toast('提交成功')
uni.$emit('updateList') uni.$emit('updateList')
@@ -108,11 +110,11 @@ export default {
}, 600) }, 600)
} }
}).catch((err) => { }).catch((err) => {
this.$u.toast(err) this.$u.toast(err)
}) })
}, },
areaSelect(e) { areaSelect(e) {
this.areaId =e this.areaId = e
this.getListInit() this.getListInit()
}, },
}, },
@@ -135,7 +137,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.AddFamily { .AddFamily {
.search{ .search {
width: 100%; width: 100%;
height: 112px; height: 112px;
padding: 32px; padding: 32px;
@@ -143,74 +145,89 @@ export default {
background: #FFF; background: #FFF;
display: flex; display: flex;
margin-bottom: 8px; margin-bottom: 8px;
.left{
.left {
width: calc(100% - 450px); width: calc(100% - 450px);
} }
} }
.userList { .userList {
width: 100%; width: 100%;
background-color: #FFFFFF ; background-color: #FFFFFF;
ul {
padding-left: 0px; ul {
padding-left: 0px;
li { li {
list-style-type: none; list-style-type: none;
.user {
display: flex; .user {
justify-content: flex-start;
padding-top: 24px;
padding-left: 32px;
height: 100%;
.checkbox{
margin-top: 20px;
margin-right: 32px;
width: 48px;
height: 48px;
}
.userInfo {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
border-bottom: 1px solid #E4E5E6; padding-top: 24px;
padding-right: 48px; padding-left: 32px;
width: calc(100% - 100px); height: 100%;
.userImg {
.checkbox {
margin-top: 20px;
margin-right: 32px; margin-right: 32px;
width: 80px; width: 48px;
height: 80px; height: 48px;
border-radius: 50%;
} }
.info {
width: calc(100% - 120px); .userInfo {
padding-bottom: 32px;
.name {
display: flex; display: flex;
justify-content: space-between; justify-content: flex-start;
font-size: 32px; border-bottom: 1px solid #E4E5E6;
margin-bottom: 8px; padding-right: 48px;
.user-name { width: calc(100% - 100px);
font-weight: 800;
.userImg {
margin-right: 32px;
width: 80px;
height: 80px;
border-radius: 50%;
} }
.user-tel {
font-size: 26px; .info {
color: #999999 ; width: calc(100% - 120px);
padding-bottom: 32px;
.name {
display: flex;
justify-content: space-between;
font-size: 32px;
margin-bottom: 8px;
.user-name {
font-weight: 800;
}
.user-tel {
font-size: 26px;
color: #999999;
}
}
.idCard {
margin-bottom: 16px;
font-size: 26px;
color: #999999;
}
.address {
max-width: 100%;
word-break: break-all;
font-size: 26px;
color: #999999;
}
} }
} }
.idCard {
margin-bottom: 16px;
font-size: 26px;
color: #999999;
}
.address {
max-width: 100%;
word-break:break-all;
font-size: 26px;
color: #999999;
}
} }
}
}
} }
} }
} }
.btn { .btn {
position: fixed; position: fixed;
bottom: 0px; bottom: 0px;
@@ -218,6 +235,7 @@ export default {
width: 100%; width: 100%;
height: 120px; height: 120px;
background-color: #F3F6F9; background-color: #F3F6F9;
.handleCheck { .handleCheck {
position: fixed; position: fixed;
bottom: 18px; bottom: 18px;