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>
<script>
import Detail from './components/detail'
import Add from './components/add'
import List from './components/list'
import Detail from './detail'
import Add from './add'
import List from './list'
import SearchMap from './components/searchMap'
import Map from './components/map'
import Map from './map'
export default {
name: 'AppBuilding',

View File

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

View File

@@ -95,7 +95,7 @@
<div class="info-flex">
<span class="label">楼栋长</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)"
class="phone-icon" v-if="detailInfo.build.managerPhone">
</span>
@@ -341,18 +341,13 @@ export default {
})
},
toList() {
this.$emit('change', {
type: 'List',
})
uni.navigateTo({url: './list'})
},
callPhone(phone) {
uni.makePhoneCall({phoneNumber: phone})
},
toDetail(id) {
this.$emit('change', {
type: 'Detail',
params: {id}
})
uni.navigateTo({url: `./detail?id=${id}`})
},
}
}

View File

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

View File

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

View File

@@ -1,7 +1,7 @@
<template>
<div class="map">
<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 class="map-content">
<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'
export default {
props: ['params'],
data() {
return {
ops: {},
@@ -67,7 +66,6 @@ export default {
mounted() {
this.initMap()
},
methods: {
initMap() { //
this.$nextTick(() => {
@@ -107,10 +105,10 @@ export default {
if (!this.latLng.lat) {
return this.$u.toast(`未获取到定位信息,无法定位`)
}
let {id} = this.$route.query
this.$http.post(`/app/appcommunitybuildinginfo/updateLocation`, null, {
params: {
id: this.params.id,
id,
lat: this.latLng.lat,
lng: this.latLng.lng,
}
@@ -126,12 +124,8 @@ export default {
})
},
toDetail() {
this.$emit('change', {
type: 'Detail',
params: this.params
})
uni.navigateTo({url: `./detail?id=${this.$route.query.id}`})
}
}
}
</script>