BUG 25784

This commit is contained in:
aixianling
2021-12-23 16:42:14 +08:00
parent 13b6a85497
commit de5bcb1e22
6 changed files with 295 additions and 214 deletions

View File

@@ -9,11 +9,11 @@
</template> </template>
<script> <script>
import Detail from './components/detail' import Detail from './detail'
import Add from './components/add' import Add from './add'
import List from './components/list' import List from './list'
import SearchMap from './components/searchMap' import SearchMap from './components/searchMap'
import Map from './components/map' import Map from './map'
export default { export default {
name: 'AppBuilding', name: 'AppBuilding',

View File

@@ -7,41 +7,54 @@
<div class="item"> <div class="item">
<span class="label">房屋面积</span> <span class="label">房屋面积</span>
<div class="value"> <div class="value">
<u-input type="digit" placeholder="请输入" v-model="houseInfo.houseArea" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="7" /> <u-input type="digit" placeholder="请输入" v-model="houseInfo.houseArea" input-align="right"
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="7"/>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<span class="label">居住现状</span> <span class="label">居住现状</span>
<div class="value" @click="selectClick('houselivingStatus', 'livingStatus')"> <div class="value" @click="selectClick('houselivingStatus', 'livingStatus')">
<span :class="houseInfo.livingStatus === '' ? 'color-999' : ''">{{ $dict.getLabel('houselivingStatus', houseInfo.livingStatus) || '请选择'}}</span> <span
: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"></u-icon>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<span class="label">房屋用途</span> <span class="label">房屋用途</span>
<div class="value" @click="selectClick('houseUseStatus', 'houseUse')"> <div class="value" @click="selectClick('houseUseStatus', 'houseUse')">
<span :class="houseInfo.houseUse === '' ? 'color-999' : ''">{{$dict.getLabel('houseUseStatus', houseInfo.houseUse) || '请选择'}}</span> <span
: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"></u-icon>
</div> </div>
</div> </div>
<div class="item" v-if="houseInfo.livingStatus == 1"> <div class="item" v-if="houseInfo.livingStatus == 1">
<span class="label">承租情况</span> <span class="label">承租情况</span>
<div class="value" @click="selectClick('houseLeaseSituation', 'leaseSituation')"> <div class="value" @click="selectClick('houseLeaseSituation', 'leaseSituation')">
<span :class="houseInfo.leaseSituation === '' ? 'color-999' : ''">{{ $dict.getLabel('houseLeaseSituation', houseInfo.leaseSituation) || '请选择'}}</span> <span
: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"></u-icon>
</div> </div>
</div> </div>
<div class="item" v-if="houseInfo.livingStatus == 1"> <div class="item" v-if="houseInfo.livingStatus == 1">
<span class="label">起租日期</span> <span class="label">起租日期</span>
<div class="value" @click="dateShow=true"> <div class="value" @click="dateShow=true">
<span :class="houseInfo.startDate === '' ? 'color-999' : ''">{{ houseInfo.startDate || '请选择'}}</span> <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"></u-icon>
</div> </div>
</div> </div>
<div class="item" v-if="houseInfo.livingStatus == 1"> <div class="item" v-if="houseInfo.livingStatus == 1">
<span class="label">租房备案证明</span> <span class="label">租房备案证明</span>
<div class="value" @click="selectClick('isFilingCertificateStatus', 'isFilingCertificate')"> <div class="value" @click="selectClick('isFilingCertificateStatus', 'isFilingCertificate')">
<span :class="houseInfo.isFilingCertificate === '' ? 'color-999' : ''">{{ $dict.getLabel('isFilingCertificateStatus', houseInfo.isFilingCertificate) || '请选择'}}</span> <span
: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"></u-icon>
</div> </div>
</div> </div>
@@ -53,9 +66,12 @@
</div> </div>
<div class="pad-l32"> <div class="pad-l32">
<div class="item" v-for="(item, index) in houseInfo.owner" :key="index"> <div class="item" v-for="(item, index) in houseInfo.owner" :key="index">
<span class="label">{{item.name}}</span> <span class="label">{{ item.name }}</span>
<div class="value" @click="tableRelationSelect('owner', index)"> <div class="value" @click="tableRelationSelect('owner', index)">
<span :class=" item.relation === '' ? 'color-999' : ''">{{$dict.getLabel('householdRelation', item.relation) || '与户主关系'}}</span> <span
: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"></u-icon>
</div> </div>
</div> </div>
@@ -67,9 +83,12 @@
</div> </div>
<div class="pad-l32"> <div class="pad-l32">
<div class="item" v-for="(item, index) in houseInfo.renter" :key="index"> <div class="item" v-for="(item, index) in houseInfo.renter" :key="index">
<span class="label">{{item.name}}</span> <span class="label">{{ item.name }}</span>
<div class="value" @click="tableRelationSelect('renter', index)"> <div class="value" @click="tableRelationSelect('renter', index)">
<span :class=" item.relation === '' ? 'color-999' : ''">{{$dict.getLabel('householdRelation', item.relation) || '与户主关系'}}</span> <span
: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"></u-icon>
</div> </div>
</div> </div>
@@ -81,9 +100,12 @@
</div> </div>
<div class="pad-l32"> <div class="pad-l32">
<div class="item" v-for="(item, index) in houseInfo.live" :key="index"> <div class="item" v-for="(item, index) in houseInfo.live" :key="index">
<span class="label">{{item.name}}</span> <span class="label">{{ item.name }}</span>
<div class="value" @click="tableRelationSelect('live', index)"> <div class="value" @click="tableRelationSelect('live', index)">
<span :class=" item.relation === '' ? 'color-999' : ''">{{$dict.getLabel('householdRelation', item.relation) || '与户主关系'}}</span> <span
: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"></u-icon>
</div> </div>
</div> </div>
@@ -92,37 +114,38 @@
<div class="btn">保存</div> <div class="btn">保存</div>
</div> </div>
<u-picker mode="time" v-model="dateShow" :params="deteParams" start-year="2010" @confirm="dateConfirm" >请选择</u-picker> <u-picker mode="time" v-model="dateShow" :params="deteParams" start-year="2010" @confirm="dateConfirm">请选择
<u-select v-model="showSelect" :list="selectList" label-name="dictName" value-name="dictValue" @confirm="confirmSelect"></u-select> </u-picker>
<u-select v-model="showRelation" :list="$dict.getDict('householdRelation')" label-name="dictName" value-name="dictValue" @confirm="confirmRelation"></u-select> <u-select v-model="showSelect" :list="selectList" label-name="dictName" value-name="dictValue"
@confirm="confirmSelect"></u-select>
<u-select v-model="showRelation" :list="$dict.getDict('householdRelation')" label-name="dictName"
value-name="dictValue" @confirm="confirmRelation"></u-select>
</div> </div>
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex' import {mapActions, mapState} from 'vuex'
export default { export default {
data() { data() {
return { return {
id: '',
houseInfo: {}, houseInfo: {},
showSelect: false, showSelect: false,
selectList: [], selectList: [],
formName: '', formName: '',
dateShow: false, dateShow: false,
deteParams: { year: true, month: true, day: true, hour: false, minute: false, second: false}, deteParams: {year: true, month: true, day: true, hour: false, minute: false, second: false},
showRelation: false, showRelation: false,
tableName: '', tableName: '',
tableIndex: '', tableIndex: '',
communityId: '' lockSelector: false
} }
}, },
computed: { ...mapState(['user']) }, computed: {...mapState(['user'])},
mounted() { created() {
this.id = this.params.id
this.communityId = this.params.communityId
this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus', this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus',
'isFilingCertificateStatus', 'communityBuildingType', 'yesOrNo', 'BulidResidentType').then(() => { 'isFilingCertificateStatus', 'communityBuildingType', 'yesOrNo', 'BulidResidentType').then(() => {
this.getDetail() this.getDetail()
}) })
}, },
@@ -130,12 +153,17 @@ export default {
methods: { methods: {
...mapActions(['selectEnterpriseContact']), ...mapActions(['selectEnterpriseContact']),
handleSelectUser(fieldDbName) { handleSelectUser(fieldDbName) {
if (this.lockSelector) return
this.lockSelector = true
this.selectEnterpriseContact({ this.selectEnterpriseContact({
fromDepartmentId: 0, fromDepartmentId: 0,
type: ["user"], type: ["user"],
selectedUserIds: this.houseInfo[fieldDbName]?.map(e => e.id) selectedUserIds: this.houseInfo[fieldDbName]?.map(e => e.id)
}).then(res => { }).then(res => {
this.houseInfo[fieldDbName] = res?.userList || [] this.houseInfo[fieldDbName] = res?.userList || []
this.lockSelector = false
}).catch(() => {
this.lockSelector = false
}) })
}, },
tableRelationSelect(name, index) { tableRelationSelect(name, index) {
@@ -144,13 +172,13 @@ export default {
this.showRelation = true this.showRelation = true
}, },
confirmRelation(e) { confirmRelation(e) {
console.log(this.houseInfo[this.tableName][this.tableIndex])
this.houseInfo[this.tableName][this.tableIndex].relation = e[0].value this.houseInfo[this.tableName][this.tableIndex].relation = e[0].value
}, },
getDetail() { getDetail() {
this.$http.post(`app/appcommunityhouseinfo/queryDetailById?id=${this.id}`).then(res => { let {id} = this.$route.query
if (res.code == 0) { id && this.$http.post(`app/appcommunityhouseinfo/queryDetailById?id=${id}`).then(res => {
if(res.data.startDate) { if (res?.data) {
if (res.data.startDate) {
res.data.startDate = res.data.startDate.substring(0, 10) res.data.startDate = res.data.startDate.substring(0, 10)
} }
this.houseInfo = res.data this.houseInfo = res.data
@@ -162,18 +190,12 @@ export default {
if (res.code == 0) { if (res.code == 0) {
this.$u.toast('提交成功') this.$u.toast('提交成功')
setTimeout(() => { setTimeout(() => {
this.$emit('change', { uni.navigateBack({})
type: 'Detail',
params: {
id: this.communityId
}
})
}, 600) }, 600)
} }
}) })
}, },
selectClick(dictName, formName) { selectClick(dictName, formName) {
console.log(123)
this.selectList = this.$dict.getDict(dictName) this.selectList = this.$dict.getDict(dictName)
this.formName = formName this.formName = formName
this.showSelect = true this.showSelect = true
@@ -191,7 +213,8 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.add { .add {
padding-bottom: 112px; padding-bottom: 112px;
.title{
.title {
width: 100%; width: 100%;
height: 96px; height: 96px;
line-height: 96px; line-height: 96px;
@@ -202,23 +225,26 @@ export default {
padding-right: 32px; padding-right: 32px;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
.tips{
.tips {
display: inline-block; display: inline-block;
width: 8px; width: 8px;
height: 32px; height: 32px;
background: #4E75FE; background: #4E75FE;
box-shadow: 0px 8px 24px 2px #C9D8FA; box-shadow: 0 8px 24px 2px #C9D8FA;
border-radius: 4px; border-radius: 4px;
vertical-align: middle; vertical-align: middle;
margin-right: 22px; margin-right: 22px;
} }
.select{
.select {
float: right; float: right;
font-size: 30px; font-size: 30px;
color: #1365DD; color: #1365DD;
} }
} }
.item{
.item {
width: 100%; width: 100%;
padding: 34px 32px 34px 0; padding: 34px 32px 34px 0;
background: #FFFFFF; background: #FFFFFF;
@@ -230,22 +256,26 @@ export default {
color: #333; color: #333;
line-height: 44px; line-height: 44px;
box-sizing: border-box; box-sizing: border-box;
.color-999{
.color-999 {
color: #999; color: #999;
} }
.value{
.u-icon{ .value {
.u-icon {
margin-left: 16px; margin-left: 16px;
} }
} }
} }
.footer{
.footer {
width: 100%; width: 100%;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
} }
.btn{
.btn {
width: 100%; width: 100%;
height: 112px; height: 112px;
line-height: 112px; line-height: 112px;
@@ -256,12 +286,14 @@ export default {
font-weight: 500; font-weight: 500;
color: #FFF; color: #FFF;
} }
.line-bg{
.line-bg {
width: 100%; width: 100%;
height: 16px; height: 16px;
background: #F5F5F5; background: #F5F5F5;
} }
.pad-l32{
.pad-l32 {
padding-left: 32px; padding-left: 32px;
background-color: #fff; background-color: #fff;
} }

View File

@@ -95,7 +95,7 @@
<div class="info-flex"> <div class="info-flex">
<span class="label">楼栋长</span> <span class="label">楼栋长</span>
<span <span
class="value">{{ building.managerName || '' }}&nbsp;&nbsp;{{building.managerPhone || '' }} class="value">{{ building.managerName || '' }}&nbsp;&nbsp;{{ building.managerPhone || '' }}
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(detailInfo.build.managerPhone)" <img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(detailInfo.build.managerPhone)"
class="phone-icon" v-if="detailInfo.build.managerPhone"> class="phone-icon" v-if="detailInfo.build.managerPhone">
</span> </span>
@@ -341,18 +341,13 @@ export default {
}) })
}, },
toList() { toList() {
this.$emit('change', { uni.navigateTo({url: './list'})
type: 'List',
})
}, },
callPhone(phone) { callPhone(phone) {
uni.makePhoneCall({phoneNumber: phone}) uni.makePhoneCall({phoneNumber: phone})
}, },
toDetail(id) { toDetail(id) {
this.$emit('change', { uni.navigateTo({url: `./detail?id=${id}`})
type: 'Detail',
params: {id}
})
}, },
} }
} }

View File

@@ -1,27 +1,27 @@
<template> <template>
<div class="detail"> <div class="detail">
<AiTopFixed> <AiTopFixed>
<div class="select-flex" v-if="selectList.length" @click="showSelect=true"> <div class="select-flex" @click="showSelect=true">
<span class="name">{{selectList[selectCellIndex].cellName}}</span> <span class="name" v-text="cellName"/>
<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>{{numInfo['实有户数'] || 0}}</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>{{numInfo['实有人口'] || 0}}</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>{{numInfo['流动人口'] || 0}}</h2> <h2>{{ numInfo['流动人口'] || 0 }}</h2>
<p>流动人口</p> <p>流动人口</p>
</div> </div>
</div> </div>
@@ -32,47 +32,48 @@
<div class="left"> <div class="left">
<div class="item-content" v-for="(item, index) in list" :key="index" @click="getHouseDetail(item.id)"> <div class="item-content" v-for="(item, index) in list" :key="index" @click="getHouseDetail(item.id)">
<div class="item"> <div class="item">
<h2>{{item.houseCode}}</h2> <h2>{{ item.houseCode }}</h2>
<p>无人</p> <p v-text="`${item.livingNumber}人`.replace(/0人/,'无人')"/>
</div> </div>
</div> </div>
<AiEmpty v-if="!list.length" style="padding-bottom:80px;" /> <AiEmpty v-if="!list.length" style="padding-bottom:80px;"/>
</div> </div>
</div> </div>
<u-select v-model="showSelect" :list="selectList" label-name="cellName" value-name="id" @confirm="confirmSelect"></u-select> <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">{{houseInfo.createAddress}}</div> <div class="title">{{ houseInfo.createAddress }}</div>
<div class="row-info"> <div class="row-info">
<div class="row-item left"> <div class="row-item left">
<h3>{{houseInfo.houseArea}} </h3> <h3>{{ `${houseInfo.houseArea || 0}`.replace(/0㎡/, "未统计") }} </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>{{$dict.getLabel('houseUseStatus', houseInfo.houseUse)}} </h3> <h3>{{ $dict.getLabel('houseUseStatus', houseInfo.houseUse) || "无" }} </h3>
<p>房屋用途</p> <p>房屋用途</p>
</div> </div>
<div class="row-item right"> <div class="row-item right">
<h3>{{ $dict.getLabel('houselivingStatus', houseInfo.livingStatus) }}</h3> <h3>{{ $dict.getLabel('houselivingStatus', houseInfo.livingStatus) || "未使用" }}</h3>
<p>居住现状</p> <p>居住现状</p>
</div> </div>
</div> </div>
<div class="row-info"> <div class="row-info" v-if="!!houseInfo.leaseSituation">
<div class="row-item left"> <div class="row-item left">
<h3>{{ $dict.getLabel('houseLeaseSituation', houseInfo.leaseSituation) }}</h3> <h3>{{ $dict.getLabel('houseLeaseSituation', houseInfo.leaseSituation) || "无" }}</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>{{houseInfo.startDate}}</h3> <h3>{{ houseInfo.startDate }}</h3>
<p>起租日期</p> <p>起租日期</p>
</div> </div>
<div class="row-item right"> <div class="row-item right">
<h3>{{ houseInfo.isFilingCertificate == 1 ? '有' : '无'}}</h3> <h3>{{ houseInfo.isFilingCertificate == 1 ? '有' : '无' }}</h3>
<p>租房备案证明</p> <p>租房备案证明</p>
</div> </div>
</div> </div>
@@ -84,10 +85,10 @@
<div class="info-flex" v-for="(item, index) in houseInfo.owner" :key="index"> <div class="info-flex" v-for="(item, index) in houseInfo.owner" :key="index">
<div class="item"> <div class="item">
<span class="label">房主</span> <span class="label">房主</span>
<span class="value">{{item.name}}</span> <span class="value">{{ item.name }}</span>
</div> </div>
<div class="item"> <div class="item">
<span class="label">联系方式</span>{{item.phone}} <span class="label">联系方式</span>{{ item.phone }}
</div> </div>
</div> </div>
</div> </div>
@@ -96,10 +97,10 @@
<div class="info-flex" v-for="(item, index) in houseInfo.renter" :key="index"> <div class="info-flex" v-for="(item, index) in houseInfo.renter" :key="index">
<div class="item"> <div class="item">
<span class="label">房主</span> <span class="label">房主</span>
<span class="value">{{item.name}}</span> <span class="value">{{ item.name }}</span>
</div> </div>
<div class="item"> <div class="item">
<span class="label">联系方式</span>{{item.phone}} <span class="label">联系方式</span>{{ item.phone }}
</div> </div>
</div> </div>
</div> </div>
@@ -112,27 +113,28 @@
<div class="info-flex"> <div class="info-flex">
<div class="item"> <div class="item">
<span class="label">居住人</span> <span class="label">居住人</span>
<span class="value">{{item.name}}</span> <span class="value">{{ item.name }}</span>
</div> </div>
<div class="item"> <div class="item">
<span class="label">联系方式</span>{{item.phone}} <span class="label">联系方式</span>{{ item.phone }}
</div> </div>
</div> </div>
<div class="info-flex mar-t48"> <div class="info-flex mar-t48">
<div class="item"> <div class="item">
<span class="label">与户主关系</span>{{$dict.getLabel('householdRelation', item.relation)}} <span class="label">与户主关系</span>{{ $dict.getLabel('householdRelation', item.relation) }}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="pop-btn" @click="toAdd">编辑修改</div> <div class="pop-btn" @click="toAdd(houseInfo.id)">编辑修改</div>
</u-popup> </u-popup>
</div> </div>
</template> </template>
<script> <script>
import { mapState } from 'vuex' import {mapState} from 'vuex'
export default { export default {
props: ['params'], props: ['params'],
data() { data() {
@@ -149,53 +151,69 @@ export default {
showSelect: false, showSelect: false,
selectList: [], selectList: [],
selectCellIndex: 0, selectCellIndex: 0,
houseId: '' houseId: '',
detail: {}
} }
}, },
computed: { ...mapState(['user']) }, computed: {
mounted() { ...mapState(['user']),
this.communityId = this.params.id cellName() {
let building = this.selectList.find(e => e.id == this.detail.id)
return building?.cellName || ""
}
},
created() {
this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus', this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus',
'isFilingCertificateStatus', 'communityBuildingType', 'yesOrNo', 'BulidResidentType').then(() => { 'isFilingCertificateStatus', 'communityBuildingType', 'yesOrNo', 'BulidResidentType').then(() => {
this.getSelectList() this.getBuilding()
}) })
}, },
methods: { methods: {
getSelectList() { getSelectList(communityId) {
this.$http.post(`app/appcommunitybuildinginfo/list?communityId=${this.communityId}&size=999`).then(res => { //ID,
if (res.code == 0 && res.data.records) { this.$http.post(`/app/appcommunitybuildinginfo/list`, null, {
res.data.records.map((item) => { params: {communityId, size: 999}
item.cellName = item.communityName + item.buildingNumber + '栋' + item.unitNumber + '单元' }).then(res => {
}) if (res?.data) {
this.selectList = res.data.records this.selectList = res.data.records.map(e => ({
...e,
cellName: `${e.communityName + e.buildingNumber}${e.unitNumber}单元`
}))
}
})
},
getBuilding() {
//
let {id} = this.$route.query
this.$http.post(`/app/appcommunitybuildinginfo/queryDetailById`, null, {
params: {id}
}).then(res => {
if (res?.data) {
this.detail = res.data
this.getStatistics() this.getStatistics()
this.getList() this.getList()
this.getSelectList(res.data.communityId)
} }
}) })
}, },
getStatistics() { getStatistics() {
this.$http.post(`app/appcommunitybuildinginfo/statistics`, null , { //
params: { let {id, unitNumber: unitNum} = this.detail
id: this.selectList[this.selectCellIndex].communityId, this.$http.post(`app/appcommunitybuildinginfo/statistics`, null, {
unitNum: this.selectList[this.selectCellIndex].unitNumber params: {id, unitNum}
}
}).then(res => { }).then(res => {
if (res.code == 0) { if (res?.data) {
this.numInfo = res.data.unit this.numInfo = res.data.unit
} }
}) })
}, },
getList() { getList() {
//
let {id: buildingId, unitNumber} = this.detail
this.$http.post(`app/appcommunityhouseinfo/list`, null, { this.$http.post(`app/appcommunityhouseinfo/list`, null, {
params: { params: {size: 10000, buildingId, unitNumber}
current: 1,
size: 1000,
buildingId: this.selectList[this.selectCellIndex].id,
unitNumber: this.selectList[this.selectCellIndex].unitNumber
}
}).then(res => { }).then(res => {
if (res.code == 0) { if (res?.data) {
this.list = res.data.records this.list = res.data.records
} }
}) })
@@ -204,7 +222,7 @@ export default {
this.houseId = id this.houseId = id
this.$http.post(`app/appcommunityhouseinfo/queryDetailById?id=${id}`).then(res => { this.$http.post(`app/appcommunityhouseinfo/queryDetailById?id=${id}`).then(res => {
if (res.code == 0) { if (res.code == 0) {
if(res.data.startDate) { if (res.data.startDate) {
res.data.startDate = res.data.startDate.substring(0, 10) res.data.startDate = res.data.startDate.substring(0, 10)
} }
this.houseInfo = res.data this.houseInfo = res.data
@@ -215,98 +233,109 @@ export default {
}, },
confirmSelect(e) { confirmSelect(e) {
this.selectList.map((item, index) => { this.selectList.map((item, index) => {
if(item.id == e[0].value) { if (item.id == e[0].value) {
this.selectCellIndex = index this.selectCellIndex = index
} }
}) })
this.getStatistics() this.getStatistics()
this.getList() this.getList()
}, },
toAdd() { toAdd(id) {
this.$emit('change', { uni.navigateTo({url: `./add?id=${id}`})
type: 'Add',
params: {
id: this.houseId,
communityId: this.communityId
}
})
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.detail { .detail {
.select-flex{ .select-flex {
padding: 20px 40px 40px; padding: 20px 40px 40px;
box-sizing: border-box; box-sizing: border-box;
line-height: 50px; line-height: 50px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
background-color: #fff; background-color: #fff;
.name{
.name {
width: 560px; width: 560px;
word-break: break-all; word-break: break-all;
font-size: 36px; font-size: 36px;
font-weight: 800; font-weight: 800;
color: #333; color: #333;
} }
.btn{
.btn {
width: 70px; width: 70px;
color: #1365DD; color: #1365DD;
font-size: 30px; font-size: 30px;
} }
} }
.num-content{
.num-content {
width: 100%; width: 100%;
padding: 0 0 18px 40px;
background-color: #fff; background-color: #fff;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
.num-item{
.num-item {
flex: 1; flex: 1;
.content{ min-width: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 142px;
padding-top: 20px;
box-sizing: border-box;
.content {
width: 120px; width: 120px;
text-align: center; text-align: center;
} }
h2{
h2 {
font-size: 36px; font-size: 36px;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
line-height: 42px; line-height: 42px;
padding-top: 46px;
} }
p{
p {
font-size: 26px; font-size: 26px;
color: #666; color: #666;
line-height: 36px; line-height: 36px;
} }
} }
} }
.line-bg{
.line-bg {
width: 100%; width: 100%;
height: 8px; height: 8px;
background: #F1F6F9; background: #F1F6F9;
} }
.list-content{
.list-content {
background-color: #fff; background-color: #fff;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
padding: 48px 2px 0 32px; padding: 48px 2px 0 32px;
box-sizing: border-box; box-sizing: border-box;
.left{
.left {
// width: calc(100% - 120px); // width: calc(100% - 120px);
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
.item-content{
.item-content {
width: 33%; width: 33%;
padding-right: 32px; padding-right: 32px;
box-sizing: border-box; box-sizing: border-box;
float: left; float: left;
} }
.item{
.item {
width: 100%; width: 100%;
height: 158px; height: 158px;
background: #FAFBFF; background: #FAFBFF;
@@ -316,24 +345,28 @@ export default {
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
margin: 0 32px 32px 0; margin: 0 32px 32px 0;
h2{
h2 {
font-size: 38px; font-size: 38px;
color: #5088FF; color: #5088FF;
line-height: 44px; line-height: 44px;
margin: 14px 0 26px 0; margin: 14px 0 26px 0;
} }
p{
p {
font-size: 32px; font-size: 32px;
color: #333; color: #333;
line-height: 44px; line-height: 44px;
} }
} }
.item:nth-of-type(2n) { .item:nth-of-type(2n) {
margin-right: 0; margin-right: 0;
} }
} }
.right{
.item{ .right {
.item {
width: 120px; width: 120px;
height: 60px; height: 60px;
line-height: 60px; line-height: 60px;
@@ -348,7 +381,8 @@ export default {
letter-spacing: -1px; letter-spacing: -1px;
margin-bottom: 24px; margin-bottom: 24px;
} }
.active{
.active {
background: #5088FF; background: #5088FF;
border-radius: 2px; border-radius: 2px;
border: 1px solid #E7E7E7; border: 1px solid #E7E7E7;
@@ -356,16 +390,19 @@ export default {
} }
} }
} }
.popup{
.popup {
padding-left: 32px; padding-left: 32px;
.bg{
.bg {
width: 64px; width: 64px;
height: 10px; height: 10px;
background: #CCC; background: #CCC;
border-radius: 6px; border-radius: 6px;
margin: 32px 0 32px 344px; margin: 32px 0 32px 344px;
} }
.title{
.title {
font-size: 36px; font-size: 36px;
font-family: PingFang-SC-Heavy, PingFang-SC; font-family: PingFang-SC-Heavy, PingFang-SC;
font-weight: 800; font-weight: 800;
@@ -373,43 +410,51 @@ export default {
line-height: 50px; line-height: 50px;
margin-bottom: 40px; margin-bottom: 40px;
} }
.row-info{
.row-info {
padding-bottom: 48px; padding-bottom: 48px;
.row-item{
.row-item {
display: inline-block; display: inline-block;
width: 33%; width: 33%;
h3{
h3 {
font-size: 32px; font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #4E75FE; color: #4E75FE;
line-height: 64px; line-height: 64px;
} }
p{
p {
font-size: 28px; font-size: 28px;
color: #666; color: #666;
line-height: 42px; line-height: 42px;
} }
} }
.left{
.left {
width: calc(28% - 70px); width: calc(28% - 70px);
text-align: center; text-align: center;
margin-right: 70px; margin-right: 70px;
box-sizing: border-box; box-sizing: border-box;
} }
.center{
.center {
width: 36%; width: 36%;
text-align: center; text-align: center;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
.left-line{
.left-line {
position: absolute; position: absolute;
top: 20px; top: 20px;
left: 0; left: 0;
height: 64px; height: 64px;
border-left: 1px solid #E5E5E5; border-left: 1px solid #E5E5E5;
} }
.right-line{
.right-line {
position: absolute; position: absolute;
top: 20px; top: 20px;
right: 0; right: 0;
@@ -417,28 +462,33 @@ export default {
border-left: 1px solid #E5E5E5; border-left: 1px solid #E5E5E5;
} }
} }
.right{
.right {
width: calc(33% - 40px); width: calc(33% - 40px);
text-align: center; text-align: center;
margin-left: 40px; margin-left: 40px;
box-sizing: border-box; box-sizing: border-box;
} }
} }
.info-flex{
.info-flex {
display: flex; display: flex;
margin-bottom: 24px; margin-bottom: 24px;
padding-right: 70px; padding-right: 70px;
box-sizing: border-box; box-sizing: border-box;
.item{
.item {
flex: 1; flex: 1;
font-size: 28px; font-size: 28px;
color: #333; color: #333;
line-height: 30px; line-height: 30px;
.label{
.label {
color: #999; color: #999;
vertical-align: top; vertical-align: top;
} }
.value{
.value {
display: inline-block; display: inline-block;
width: calc(100% - 120px); width: calc(100% - 120px);
word-break: break-all; word-break: break-all;
@@ -446,18 +496,22 @@ export default {
} }
} }
} }
.line-bg{
.line-bg {
width: 100%; width: 100%;
height: 30px; height: 30px;
background: #F5F6FA; background: #F5F6FA;
} }
.pad-t32{
.pad-t32 {
padding-top: 32px; padding-top: 32px;
} }
.mar-t48{
.mar-t48 {
margin-top: 48px; margin-top: 48px;
} }
.pop-btn{
.pop-btn {
width: 100%; width: 100%;
height: 112px; height: 112px;
line-height: 112px; line-height: 112px;
@@ -469,7 +523,7 @@ export default {
} }
} }
::v-deep .content{ ::v-deep .content {
padding: 0!important; padding: 0 !important;
} }
</style> </style>

View File

@@ -5,10 +5,11 @@
</AiTopFixed> </AiTopFixed>
<div class="list-content"> <div class="list-content">
<div class="item" v-for="(item, index) in list" :key="index"> <div class="item" v-for="(item, index) in list" :key="index">
<div class="item-content" @click="toDetail(item.communityId)"> <div class="item-content" @click="toDetail(item.id)">
<p class="title line-two">{{item.communityName}}</p> <p class="title line-two">{{ item.communityName }}</p>
<p class="address">{{item.createAddress}}</p> <p class="address">{{ item.createAddress }}</p>
<span class="status" :class="'color'+item.locationStatus">{{$dict.getLabel('BuildLocationStatus', item.locationStatus)}}</span> <span class="status" :class="'color'+item.locationStatus"
v-text="$dict.getLabel('BuildLocationStatus', item.locationStatus)"/>
</div> </div>
<div class="item-btn" v-if="item.locationStatus != 1" @click="toMap(item.id, item.areaId)"> <div class="item-btn" v-if="item.locationStatus != 1" @click="toMap(item.id, item.areaId)">
<span>去定位</span> <span>去定位</span>
@@ -20,7 +21,8 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex' import {mapState} from 'vuex'
export default { export default {
data() { data() {
@@ -30,7 +32,7 @@ export default {
list: [] list: []
} }
}, },
computed: { ...mapState(['user']) }, computed: {...mapState(['user'])},
mounted() { mounted() {
this.$dict.load('BuildLocationStatus').then(() => { this.$dict.load('BuildLocationStatus').then(() => {
this.getList() this.getList()
@@ -57,16 +59,10 @@ export default {
}) })
}, },
toDetail(id) { toDetail(id) {
this.$emit('change', { uni.navigateTo({url: `./detail?id=${id}`})
type: 'Detail',
params: {id}
})
}, },
toMap(id, areaId) { toMap(id, areaId) {
this.$emit('change', { uni.navigateTo({url: `./map?id=${id}&areaId=${areaId}`})
type: 'Map',
params: {id, areaId}
})
} }
}, },
@@ -79,10 +75,11 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.list { .list {
.list-content{ .list-content {
padding: 32px 32px 0; padding: 32px 32px 0;
background-color: #F5F5F5; background-color: #F5F5F5;
.item{
.item {
width: 100%; width: 100%;
background: #FFF; background: #FFF;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02); box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02);
@@ -91,51 +88,59 @@ export default {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
margin-bottom: 32px; margin-bottom: 32px;
.item-content{
.item-content {
padding: 32px 32px 42px 32px; padding: 32px 32px 42px 32px;
} }
.title{
.title {
width: calc(100% - 60px); width: calc(100% - 60px);
word-break: break-all; word-break: break-all;
font-size: 32px; font-size: 32px;
color: #333; color: #333;
line-height: 44px; line-height: 44px;
} }
.address{
.address {
width: 100%; width: 100%;
word-break: break-all; word-break: break-all;
font-size: 28px; font-size: 28px;
color: #999; color: #999;
line-height: 40px; line-height: 40px;
} }
.status{
width: 160rpx; .status {
height: 40rpx; width: 160px;
line-height: 36rpx; height: 40px;
font-size: 26rpx; line-height: 36px;
font-size: 26px;
font-weight: 500; font-weight: 500;
position: absolute; position: absolute;
right: -38rpx; right: -38px;
top: 24rpx; top: 24px;
-webkit-transform: rotate(90deg); -webkit-transform: rotate(90deg);
transform: rotate(45deg); transform: rotate(45deg);
text-align: center; text-align: center;
} }
.color0{
.color0 {
background: #FFECEF; background: #FFECEF;
color: #f46; color: #f46;
} }
.color1{
.color1 {
background: #EEF5FF; background: #EEF5FF;
color: #5A98F2; color: #5A98F2;
} }
.item-btn{
.item-btn {
width: 100%; width: 100%;
padding: 20px 32px 20px 0; padding: 20px 32px 20px 0;
border-top: 1px solid #eee; border-top: 1px solid #eee;
text-align: right; text-align: right;
box-sizing: border-box; box-sizing: border-box;
span{
span {
display: inline-block; display: inline-block;
width: 160px; width: 160px;
height: 56px; height: 56px;
@@ -148,7 +153,8 @@ export default {
} }
} }
} }
.line-two{
.line-two {
text-overflow: -o-ellipsis-lastline; text-overflow: -o-ellipsis-lastline;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="map"> <div class="map">
<div class="build-btn"> <div class="build-btn">
<img src="./img/model-icon.png" alt="" @click="toDetail"> 楼栋<br/>模型 <img src="./components/img/model-icon.png" alt="" @click="toDetail"> 楼栋<br/>模型
</div> </div>
<div class="map-content"> <div class="map-content">
<AiTMap v-if="user.areaId" :areaId="user.areaId" :map.sync="map" :lib.sync="lib" :ops="ops" :libraries="['service', 'tools']"></AiTMap> <AiTMap v-if="user.areaId" :areaId="user.areaId" :map.sync="map" :lib.sync="lib" :ops="ops" :libraries="['service', 'tools']"></AiTMap>
@@ -51,7 +51,6 @@
import {mapState} from 'vuex' import {mapState} from 'vuex'
export default { export default {
props: ['params'],
data() { data() {
return { return {
ops: {}, ops: {},
@@ -67,7 +66,6 @@ export default {
mounted() { mounted() {
this.initMap() this.initMap()
}, },
methods: { methods: {
initMap() { // initMap() { //
this.$nextTick(() => { this.$nextTick(() => {
@@ -107,10 +105,10 @@ export default {
if (!this.latLng.lat) { if (!this.latLng.lat) {
return this.$u.toast(`未获取到定位信息,无法定位`) return this.$u.toast(`未获取到定位信息,无法定位`)
} }
let {id} = this.$route.query
this.$http.post(`/app/appcommunitybuildinginfo/updateLocation`, null, { this.$http.post(`/app/appcommunitybuildinginfo/updateLocation`, null, {
params: { params: {
id: this.params.id, id,
lat: this.latLng.lat, lat: this.latLng.lat,
lng: this.latLng.lng, lng: this.latLng.lng,
} }
@@ -126,12 +124,8 @@ export default {
}) })
}, },
toDetail() { toDetail() {
this.$emit('change', { uni.navigateTo({url: `./detail?id=${this.$route.query.id}`})
type: 'Detail',
params: this.params
})
} }
} }
} }
</script> </script>