人员组件完成
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
<template>
|
||||
<div class="AppBuilding">
|
||||
<component
|
||||
:is="component"
|
||||
@change="onChange"
|
||||
:params="params">
|
||||
</component>
|
||||
<search-map v-if="show"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -18,21 +14,17 @@ import Map from './map'
|
||||
export default {
|
||||
name: 'AppBuilding',
|
||||
appName: '以房找人',
|
||||
|
||||
data() {
|
||||
return {
|
||||
component: 'SearchMap',
|
||||
params: {}
|
||||
show: true
|
||||
}
|
||||
},
|
||||
|
||||
components: {Detail, Add, List, SearchMap, Map},
|
||||
|
||||
methods: {
|
||||
onChange(e) {
|
||||
this.params = e.params
|
||||
this.component = e.type
|
||||
}
|
||||
onShow() {
|
||||
this.show = false
|
||||
this.$nextTick(() => {
|
||||
this.show = true
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
document.title = "以房找人"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="add">
|
||||
<div class="title">
|
||||
<span class="tips"></span>房屋信息
|
||||
<span class="tips"/>房屋信息
|
||||
</div>
|
||||
<div class="pad-l32">
|
||||
<div class="item">
|
||||
@@ -18,7 +18,7 @@
|
||||
:class="houseInfo.livingStatus === '' ? 'color-999' : ''">{{
|
||||
$dict.getLabel('houselivingStatus', houseInfo.livingStatus) || '请选择'
|
||||
}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
@@ -28,7 +28,7 @@
|
||||
:class="houseInfo.houseUse === '' ? 'color-999' : ''">{{
|
||||
$dict.getLabel('houseUseStatus', houseInfo.houseUse) || '请选择'
|
||||
}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" v-if="houseInfo.livingStatus == 1">
|
||||
@@ -38,14 +38,14 @@
|
||||
:class="houseInfo.leaseSituation === '' ? 'color-999' : ''">{{
|
||||
$dict.getLabel('houseLeaseSituation', houseInfo.leaseSituation) || '请选择'
|
||||
}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" v-if="houseInfo.livingStatus == 1">
|
||||
<span class="label">起租日期</span>
|
||||
<div class="value" @click="dateShow=true">
|
||||
<span :class="houseInfo.startDate === '' ? 'color-999' : ''">{{ houseInfo.startDate || '请选择' }}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" v-if="houseInfo.livingStatus == 1">
|
||||
@@ -55,14 +55,14 @@
|
||||
:class="houseInfo.isFilingCertificate === '' ? 'color-999' : ''">{{
|
||||
$dict.getLabel('isFilingCertificateStatus', houseInfo.isFilingCertificate) || '请选择'
|
||||
}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line-bg"></div>
|
||||
<div class="line-bg"/>
|
||||
<div class="title">
|
||||
<span class="tips"></span>房主信息
|
||||
<span class="select" @click="toSelectUser">选择人员</span>
|
||||
<span class="tips"/>房主信息
|
||||
<AiPagePicker class="select" :selected.sync="houseInfo.owner">选择人员</AiPagePicker>
|
||||
</div>
|
||||
<div class="pad-l32">
|
||||
<div class="item" v-for="(item, index) in houseInfo.owner" :key="index">
|
||||
@@ -72,13 +72,13 @@
|
||||
:class=" item.relation === '' ? 'color-999' : ''">{{
|
||||
$dict.getLabel('householdRelation', item.relation) || '与户主关系'
|
||||
}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line-bg"></div>
|
||||
<div class="line-bg"/>
|
||||
<div class="title">
|
||||
<span class="tips"></span>承租人信息
|
||||
<span class="tips"/>承租人信息
|
||||
<span class="select" @click="handleSelectUser('renter')">选择人员</span>
|
||||
</div>
|
||||
<div class="pad-l32">
|
||||
@@ -89,13 +89,13 @@
|
||||
:class=" item.relation === '' ? 'color-999' : ''">{{
|
||||
$dict.getLabel('householdRelation', item.relation) || '与户主关系'
|
||||
}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line-bg"></div>
|
||||
<div class="line-bg"/>
|
||||
<div class="title">
|
||||
<span class="tips"></span>实际居住人员
|
||||
<span class="tips"/>实际居住人员
|
||||
<span class="select" @click="handleSelectUser('live')">选择人员</span>
|
||||
</div>
|
||||
<div class="pad-l32">
|
||||
@@ -106,7 +106,7 @@
|
||||
:class=" item.relation === '' ? 'color-999' : ''">{{
|
||||
$dict.getLabel('householdRelation', item.relation) || '与户主关系'
|
||||
}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="14"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -117,9 +117,9 @@
|
||||
<u-picker mode="time" v-model="dateShow" :params="deteParams" start-year="2010" @confirm="dateConfirm">请选择
|
||||
</u-picker>
|
||||
<u-select v-model="showSelect" :list="selectList" label-name="dictName" value-name="dictValue"
|
||||
@confirm="confirmSelect"></u-select>
|
||||
@confirm="confirmSelect"/>
|
||||
<u-select v-model="showRelation" :list="$dict.getDict('householdRelation')" label-name="dictName"
|
||||
value-name="dictValue" @confirm="confirmRelation"></u-select>
|
||||
value-name="dictValue" @confirm="confirmRelation"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup-btn" @click="toDetail(building.communityId)">查看楼栋模型</div>
|
||||
<div class="popup-btn" @click="toDetail(building.id)">查看楼栋模型</div>
|
||||
</u-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
<template>
|
||||
<div class="selectResident">
|
||||
<AiTopFixed>
|
||||
<u-search placeholder="搜索" v-model="name" :show-action="false"></u-search>
|
||||
</AiTopFixed>
|
||||
<div class="user-list">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="select-img" @click="checkClick(index)">
|
||||
<img :src="item.isCheck ? checkIcon : cirIcon" alt="">
|
||||
</div>
|
||||
<div class="user-info">
|
||||
<img :src="item.photo" alt="" v-if="item.photo">
|
||||
<img src="./components/img/user-img.png" alt="" v-else>{{item.name}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pad-b118"></div>
|
||||
<div class="footer">
|
||||
<div class="btn" @click="confirm">确定选择</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
current: 1,
|
||||
name: '',
|
||||
list: [],
|
||||
cirIcon: require('./components/img/cir-icon.png'),
|
||||
checkIcon: require('./components/img/check-icon.png'),
|
||||
}
|
||||
},
|
||||
computed: {...mapState(['user'])},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.$http.post(`/app/appresident/list`, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
size: 20,
|
||||
areaId: this.user.areaId,
|
||||
con: this.name
|
||||
}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
res.data.records.forEach(e => {
|
||||
e.isCheck = false
|
||||
})
|
||||
if (this.current > 1 && this.current > res.data.pages) {
|
||||
return
|
||||
}
|
||||
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
checkClick(index) {
|
||||
this.list[index].isCheck = !this.list[index].isCheck
|
||||
},
|
||||
confirm() {
|
||||
var checkList = []
|
||||
this.list.map((item) => {
|
||||
if(item.isCheck) {
|
||||
checkList.push(item)
|
||||
}
|
||||
})
|
||||
|
||||
console.log(checkList)
|
||||
|
||||
if(!checkList.length) {
|
||||
return this.$u.toast('请先选择人员')
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
console.log(111)
|
||||
this.current++
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.selectResident {
|
||||
::v-deep .AiTopFixed .u-search{
|
||||
margin-bottom: 0!important;
|
||||
}
|
||||
.pad-b118{
|
||||
padding-bottom: 118px;
|
||||
}
|
||||
.user-list{
|
||||
background-color: #fff;
|
||||
.item{
|
||||
.select-img{
|
||||
display: inline-block;
|
||||
img{
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
margin: 12px 36px 12px 30px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
.user-info{
|
||||
display: inline-block;
|
||||
padding: 20px 0 20px 0;
|
||||
width: calc(100% - 114px);
|
||||
height: 100%;
|
||||
border-bottom: 1px solid #E4E5E6;
|
||||
font-size: 36px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 74px;
|
||||
img{
|
||||
width: 74px;
|
||||
height: 74px;
|
||||
border-radius: 8px;
|
||||
margin-right: 34px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.footer{
|
||||
width: 100%;
|
||||
height: 118px;
|
||||
background: #F4F8FB;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
text-align: right;
|
||||
.btn{
|
||||
display: inline-block;
|
||||
width: 192px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
background: #1365DD;
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #FFF;
|
||||
margin: 20px 34px 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user