缺接口

This commit is contained in:
liuye
2021-12-17 17:31:12 +08:00
parent 66d1229420
commit 0f945fe56e
8 changed files with 247 additions and 101 deletions

View File

@@ -48,7 +48,7 @@ body {
uni-page-body { uni-page-body {
// min-height: 100%; // min-height: 100%;
min-height: 100vh; height: 100vh;
background: #f5f5f5; background: #f5f5f5;
position: relative; position: relative;
} }

View File

@@ -21,7 +21,7 @@ export default {
data() { data() {
return { return {
component: 'Map', component: 'Detail',
params: {} params: {}
} }
}, },

View File

@@ -1,27 +1,27 @@
<template> <template>
<div class="detail"> <div class="detail">
<AiTopFixed> <AiTopFixed>
<div class="select-flex"> <div class="select-flex" v-if="selectList.length" @click="showSelect=true">
<span class="name">后西一街新世纪花园小区新城区1栋后西一街新世纪花园小区</span> <span class="name">{{selectList[selectCellIndex].cellName}}</span>
<span class="btn">切换</span> <span class="btn">切换</span>
</div> </div>
<div class="line-bg"></div> <div class="line-bg"></div>
<div class="num-content"> <div class="num-content">
<div class="num-item"> <div class="num-item">
<div class="content"> <div class="content">
<h2>6770</h2> <h2>{{numInfo['实有户数'] || 0}}</h2>
<p>实有户数</p> <p>实有户数</p>
</div> </div>
</div> </div>
<div class="num-item"> <div class="num-item">
<div class="content"> <div class="content">
<h2>677</h2> <h2>{{numInfo['实有人口'] || 0}}</h2>
<p>实有人口</p> <p>实有人口</p>
</div> </div>
</div> </div>
<div class="num-item"> <div class="num-item">
<div class="content"> <div class="content">
<h2>67</h2> <h2>{{numInfo['流动人口'] || 0}}</h2>
<p>流动人口</p> <p>流动人口</p>
</div> </div>
</div> </div>
@@ -30,107 +30,103 @@
</AiTopFixed> </AiTopFixed>
<div class="list-content"> <div class="list-content">
<div class="left"> <div class="left">
<div class="item"> <div class="item-content" v-for="(item, index) in list" :key="index" @click="getHouseDetail(item.id)">
<h2>101</h2> <div class="item">
<p>无人</p> <h2>{{item.houseCode}}</h2>
<p>无人</p>
</div>
</div> </div>
<div class="item"> <AiEmpty v-if="!list.length" style="padding-bottom:80px;" />
<h2>101</h2>
<p>无人</p>
</div>
<div class="item">
<h2>101</h2>
<p>无人</p>
</div>
<div class="item">
<h2>101</h2>
<p>无人</p>
</div>
</div>
<div class="right">
<div class="item active">6-10&nbsp;</div>
<div class="item">6-10&nbsp;</div>
<div class="item">6-10&nbsp;</div>
<div class="item">6-10&nbsp;</div>
<div class="item">6-10&nbsp;</div>
</div> </div>
</div> </div>
<u-select v-model="showSelect" :list="selectList" label-name="cellName" value-name="id" @confirm="confirmSelect"></u-select>
<u-popup v-model="show" mode="bottom" border-radius="14"> <u-popup v-model="show" mode="bottom" border-radius="14">
<div class="popup"> <div class="popup">
<div class="bg"></div> <div class="bg"></div>
<div class="title">新城区1栋102</div> <div class="title">{{itemInfo.createAddress}}</div>
<div class="row-info"> <div class="row-info">
<div class="row-item left"> <div class="row-item left">
<h3>102 </h3> <h3>{{itemInfo.houseArea}} </h3>
<p>房屋面积</p> <p>房屋面积</p>
</div> </div>
<div class="row-item center"> <div class="row-item center">
<span class="right-line"></span> <span class="right-line"></span>
<span class="left-line"></span> <span class="left-line"></span>
<h3>居住</h3> <h3>{{$dict.getLabel('houseUseStatus', itemInfo.houseUse)}} </h3>
<p>房屋用途</p> <p>房屋用途</p>
</div> </div>
<div class="row-item right"> <div class="row-item right">
<h3>出租</h3> <h3>{{ $dict.getLabel('houselivingStatus', itemInfo.livingStatus) }}</h3>
<p>居住现状</p> <p>居住现状</p>
</div> </div>
</div> </div>
<div class="row-info"> <div class="row-info">
<div class="row-item left"> <div class="row-item left">
<h3>整租</h3> <h3>{{ $dict.getLabel('houselivingStatus', itemInfo.livingStatus) }}</h3>
<p>承租情况</p> <p>承租情况</p>
</div> </div>
<div class="row-item center"> <div class="row-item center">
<span class="right-line"></span> <span class="right-line"></span>
<span class="left-line"></span> <span class="left-line"></span>
<h3>2021-11-01</h3> <h3>{{itemInfo.startDate}}</h3>
<p>起租日期</p> <p>起租日期</p>
</div> </div>
<div class="row-item right"> <div class="row-item right">
<h3></h3> <h3>{{ itemInfo.isFilingCertificate == 1 ? '有' : '无'}}</h3>
<p>租房备案证明</p> <p>租房备案证明</p>
</div> </div>
</div> </div>
</div> </div>
<div class="line-bg"></div> <div v-if="itemInfo.owner.length || itemInfo.renter.length">
<div class="popup"> <div class="line-bg"></div>
<div class="title pad-t32">房主信息</div> <div class="popup" v-if="itemInfo.owner.length">
<div class="info-flex"> <div class="title pad-t32">房主信息</div>
<div class="item"> <div class="info-flex" v-for="(item, index) in itemInfo.owner" :key="index">
<span class="label">房主</span>李维民 <div class="item">
</div> <span class="label">房主</span>
<div class="item"> <span class="value">{{item.name}}</span>
<span class="label">联系方式</span>13891067541 </div>
<div class="item">
<span class="label">联系方式</span>{{item.phone}}
</div>
</div> </div>
</div> </div>
<div class="title pad-t32">承租人信息</div> <div class="popup" v-if="itemInfo.renter.length">
<div class="info-flex"> <div class="title pad-t32">承租人信息</div>
<div class="item"> <div class="info-flex" v-for="(item, index) in itemInfo.renter" :key="index">
<span class="label">房主</span>李维民 <div class="item">
</div> <span class="label">房主</span>
<div class="item"> <span class="value">{{item.name}}</span>
<span class="label">联系方式</span>13891067541 </div>
<div class="item">
<span class="label">联系方式</span>{{item.phone}}
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="line-bg"></div> <div v-if="itemInfo.live.length">
<div class="popup"> <div class="line-bg"></div>
<div class="title pad-t32">实际居住人员</div> <div class="popup">
<div class="info-flex"> <div class="title pad-t32">实际居住人员</div>
<div class="item"> <div v-for="(item, index) in itemInfo.live" :key="index">
<span class="label">居住人</span>李维民 <div class="info-flex">
</div> <div class="item">
<div class="item"> <span class="label">居住人</span>
<span class="label">联系方式</span>13891067541 <span class="value">{{item.name}}</span>
</div> </div>
</div> <div class="item">
<div class="info-flex mar-t48"> <span class="label">联系方式</span>{{item.phone}}
<div class="item"> </div>
<span class="label">与户主关系</span>兄弟 </div>
<div class="info-flex mar-t48">
<div class="item">
<span class="label">与户主关系</span>{{$dict.getLabel('householdRelation', item.relation)}}
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="pop-btn">编辑修改</div> <div class="pop-btn" @click="toAdd">编辑修改</div>
</u-popup> </u-popup>
</div> </div>
</template> </template>
@@ -138,19 +134,100 @@
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'
export default { export default {
props: ['params'],
data() { data() {
return { return {
show: false show: false,
buildingId: '',
list: [],
itemInfo: {
owner: [],
renter: [],
live: []
},
numInfo: {},
showSelect: false,
selectList: [],
selectCellIndex: 0,
houseId: ''
} }
}, },
computed: { ...mapState(['user']) }, computed: { ...mapState(['user']) },
mounted() { mounted() {
this.communityId = "22314444d2ff415388569600f3cecc0a"
this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus',
'isFilingCertificateStatus', 'communityBuildingType', 'yesOrNo', 'BulidResidentType').then(() => {
this.getSelectList()
})
}, },
methods: { methods: {
getSelectList() {
this.$http.post(`app/appcommunitybuildinginfo/list?communityId=${this.communityId}&size=999`).then(res => {
if (res.code == 0 && res.data.records) {
res.data.records.map((item) => {
item.cellName = item.communityName + item.buildingNumber + '栋' + item.unitNumber + '单元'
})
this.selectList = res.data.records
this.getStatistics()
this.getList()
}
})
},
getStatistics() {
this.$http.post(`app/appcommunitybuildinginfo/statistics`, null , {
params: {
id: this.selectList[this.selectCellIndex].communityId,
unitNum: this.selectList[this.selectCellIndex].unitNumber
}
}).then(res => {
if (res.code == 0) {
this.numInfo = res.data.unit
}
})
},
getList() {
// this.$http.post(`app/appcommunityhouseinfo/list`, null, {
// params: {
// current: 1,
// size: 1000,
// houseCode: this.houseCode,
// buildingId: this.buildingId
// }
// }).then(res => {
// if (res.code == 0) {
// this.list = res.data.records
// }
// })
},
getHouseDetail(id) {
this.houseId = id
this.$http.post(`app/appcommunityhouseinfo/queryDetailById?id=${id}`).then(res => {
if (res.code == 0) {
if(res.data.startDate) {
res.data.startDate = res.data.startDate.substring(0, 10)
}
this.itemInfo = res.data
this.show = true
}
})
},
confirmSelect(e) {
this.selectList.map((item, index) => {
if(item.id == e[0].value) {
this.selectCellIndex = index
}
})
},
toAdd() {
this.$emit('change', {
type: 'Add',
params: {
id: this.houseId
}
})
}
} }
} }
@@ -217,10 +294,17 @@ export default {
padding: 48px 2px 0 32px; padding: 48px 2px 0 32px;
box-sizing: border-box; box-sizing: border-box;
.left{ .left{
width: 560px; // width: calc(100% - 120px);
width: 100%;
overflow: hidden; overflow: hidden;
.item-content{
width: 33%;
padding-right: 32px;
box-sizing: border-box;
float: left;
}
.item{ .item{
width: 264px; width: 100%;
height: 158px; height: 158px;
background: #FAFBFF; background: #FAFBFF;
border-radius: 1px; border-radius: 1px;
@@ -229,7 +313,6 @@ export default {
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
margin: 0 32px 32px 0; margin: 0 32px 32px 0;
float: left;
h2{ h2{
font-size: 38px; font-size: 38px;
color: #5088FF; color: #5088FF;
@@ -288,7 +371,7 @@ export default {
margin-bottom: 40px; margin-bottom: 40px;
} }
.row-info{ .row-info{
margin-bottom: 32px; padding-bottom: 48px;
.row-item{ .row-item{
display: inline-block; display: inline-block;
width: 33%; width: 33%;
@@ -350,6 +433,12 @@ export default {
line-height: 30px; line-height: 30px;
.label{ .label{
color: #999; color: #999;
vertical-align: top;
}
.value{
display: inline-block;
width: calc(100% - 120px);
word-break: break-all;
} }
} }
} }

View File

@@ -1,19 +1,20 @@
<template> <template>
<div class="list"> <div class="list">
<AiTopFixed> <AiTopFixed>
<u-search placeholder="楼栋名称" :show-action="false" v-model="search.title" @search="current=1,getList()"/> <u-search placeholder="楼栋名称" :show-action="false" v-model="title" @search="current=1,getList()"/>
</AiTopFixed> </AiTopFixed>
<div class="list-content"> <div class="list-content">
<div class="item"> <div class="item" v-for="(item, index) in list" :key="index">
<div class="item-content"> <div class="item-content" @click="toDetail(item.communityId)">
<p class="title line-two">水果湖水岸华府小区水果湖水岸华府小区水果湖水岸华府小区水果湖水岸华府小区</p> <p class="title line-two">{{item.communityName}}</p>
<p class="address">山东省济南市历城区王舍人街道恒大商业广场蓝天城广场新区</p> <p class="address">{{item.createAddress}}</p>
<span class="status color0">已定位</span> <span class="status" :class="'color'+item.locationStatus">{{$dict.getLabel('BuildLocationStatus', item.locationStatus)}}</span>
</div> </div>
<div class="item-btn"> <div class="item-btn" v-if="item.locationStatus != 1">
<span>去定位</span> <span>去定位</span>
</div> </div>
</div> </div>
<AiEmpty v-if="!list.length"/>
</div> </div>
</div> </div>
</template> </template>
@@ -24,23 +25,49 @@ export default {
data() { data() {
return { return {
search: { title: '',
title: '' current: 1,
}, list: []
current: 1
} }
}, },
computed: { ...mapState(['user']) }, computed: { ...mapState(['user']) },
mounted() { mounted() {
this.$dict.load('BuildLocationStatus').then(() => {
this.getList()
})
}, },
methods: { methods: {
getList() { getList() {
this.$http.post(`/app/appcommunitybuildinginfo/list`, null, {
params: {
current: 1,
size: 10,
areaId: this.user.areaId,
communityName: this.title
}
}).then(res => {
if (res.code == 0) {
if (this.current > 1 && this.current > res.data.pages) {
return
}
this.list = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
this.pages = res.data.pages
}
})
},
toDetail(id) {
this.$emit('change', {
type: 'Detail',
params: {id}
})
} }
} },
onReachBottom() {
this.current++;
this.getList()
},
} }
</script> </script>
@@ -48,8 +75,9 @@ export default {
.list { .list {
.list-content{ .list-content{
padding: 32px 32px 0; padding: 32px 32px 0;
background-color: #F5F5F5;
.item{ .item{
width: 686px; width: 100%;
background: #FFF; background: #FFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.02); box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.02);
border-radius: 8px; border-radius: 8px;
@@ -61,7 +89,7 @@ export default {
padding: 32px 32px 42px 32px; padding: 32px 32px 42px 32px;
} }
.title{ .title{
width: 540px; width: calc(100% - 60px);
word-break: break-all; word-break: break-all;
font-size: 32px; font-size: 32px;
color: #333; color: #333;

View File

@@ -19,7 +19,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="build-btn"> <div class="build-btn" @click="toList()">
<img src="./img/build-icon.png" alt=""> 楼栋<br/>列表 <img src="./img/build-icon.png" alt=""> 楼栋<br/>列表
</div> </div>
<div class="map-content"> <div class="map-content">
@@ -110,7 +110,12 @@ export default {
}) })
}, },
toList() {
console.log(122)
this.$emit('change', {
type: 'List',
})
}
} }
} }
</script> </script>

View File

@@ -34,7 +34,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
uni-page-body{ ::v-deep uni-page-body{
height: 100%; height: 100%;
} }
.AppGridManagement{ .AppGridManagement{

View File

@@ -3,7 +3,10 @@
<div class="grid-select" @click="show=true"> <div class="grid-select" @click="show=true">
<span class="label">网格选择</span> <span class="label">网格选择</span>
<div class="value"> <div class="value">
<span>新里程社区居委会</span> <!-- <span>新里程社区居委会</span> -->
<ai-tree-picker :ops="treeList" v-model="form.postFunctionId" @select="handerSelect">
<div :style="{ color: form.postFunction ? '' : '#c0c4cc' }" v-text="form.postFunction || '请选择社区居委会'" />
</ai-tree-picker>
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon> <u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
</div> </div>
</div> </div>
@@ -43,8 +46,9 @@ export default {
ops: {}, ops: {},
lib: '', lib: '',
map: null, map: null,
markerArr: [], show: false,
show: false form: {},
treeList: []
} }
}, },
computed: { ...mapState(['user']) }, computed: { ...mapState(['user']) },
@@ -54,6 +58,9 @@ export default {
}, },
methods: { methods: {
handerSelect() {
},
initMap() { initMap() {
//初始化地图 //初始化地图
@@ -120,9 +127,12 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
uni-page-body{ ::v-deep uni-page-body{
height: 100%; height: 100%;
} }
ai-tree-picker{
display: inline-block;
}
.detail { .detail {
height: 100%; height: 100%;
.grid-select{ .grid-select{

View File

@@ -90,7 +90,7 @@
<div class="item area" v-if="item.type == 'area'"> <div class="item area" v-if="item.type == 'area'">
<span class="label"><span class="tips">{{item.mustFill == 1 ? '*' : ''}}</span>{{item.fieldName}}</span> <span class="label"><span class="tips">{{item.mustFill == 1 ? '*' : ''}}</span>{{item.fieldName}}</span>
<div class="value"> <div class="value">
<AiAreaPicker v-model="formData[item.fieldDbName]" :areaId="user.areaId"></AiAreaPicker> <AiAreaPicker v-model="formData[item.fieldDbName]" :areaId="user.areaId" :name.sync="formData[item.fieldDbName+'_name']"></AiAreaPicker>
<u-icon name="arrow-right area-icon" color="#cccccc" size="14"></u-icon> <u-icon name="arrow-right area-icon" color="#cccccc" size="14"></u-icon>
</div> </div>
</div> </div>
@@ -235,7 +235,7 @@ export default {
colItem = { colItem = {
...item, ...item,
type: item.type, type: item.type,
fieldValue: this.user.areaId fieldValue: this.user.areaId,
} }
}else { }else {
if (item.type == 'date') { if (item.type == 'date') {
@@ -268,6 +268,9 @@ export default {
this.formData[e.fieldDbName] = false this.formData[e.fieldDbName] = false
} }
}) })
if (e.type == 'area') { //开关
this.formData[e.fieldDbName+'_name'] = this.user.areaName
}
}) })
this.$forceUpdate() this.$forceUpdate()
this.pageShow = true this.pageShow = true
@@ -290,6 +293,9 @@ export default {
if (e.type == 'onOff') { //开关 if (e.type == 'onOff') { //开关
this.formData[e.fieldDbName] = false this.formData[e.fieldDbName] = false
} }
if (e.type == 'area') { //开关
this.formData[e.fieldDbName+'_name'] = this.user.areaName
}
}) })
}) })
this.$forceUpdate() this.$forceUpdate()
@@ -354,6 +360,12 @@ export default {
if (items.type == 'onOff') { //开关 if (items.type == 'onOff') { //开关
this.formData[items.fieldDbName] = this.formData[items.fieldDbName] ? '1' : '0' this.formData[items.fieldDbName] = this.formData[items.fieldDbName] ? '1' : '0'
} }
if(items.type == 'area' && this.formData[items.fieldDbName]) {
var area = []
area.push(this.formData[items.fieldDbName])
area.push(this.formData[items.fieldDbName+'_name'])
this.formData[items.fieldDbName] = area.join('_')
}
}) })
} }
}) })
@@ -376,7 +388,9 @@ export default {
if (res.code == 0) { if (res.code == 0) {
this.$u.toast('提交成功') this.$u.toast('提交成功')
setTimeout(() => { setTimeout(() => {
this.onBack(true) this.$emit('change', {
type: 'Detail',
})
}, 600) }, 600)
} }
}) })