<template>
|
<view class="">
|
<view class="bgc-ff">
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>小区名称</text>
|
<text>{{detail.name}}</text>
|
</view>
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>居委会名称</text>
|
<text>{{detail.communityName}}</text>
|
</view>
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>小区住址</text>
|
<text class="address">{{detail.address}}</text>
|
</view>
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>党组织名称</text>
|
<text class="address">{{detail.organizationName || ""}}</text>
|
</view>
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>党组织类型</text>
|
<text class="address">{{organizationTypeName}}</text>
|
</view>
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>支部类型</text>
|
<text class="address">{{branchTypeName}}</text>
|
</view>
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>负责人姓名</text>
|
<text class="address">{{detail.chargePerson || ""}}</text>
|
</view>
|
<view class="item-row flex j-c-s-b a-i-c">
|
<text>负责人手机号</text>
|
<text class="address">{{detail.phone || ""}}</text>
|
</view>
|
</view>
|
<view class="box bgc-ff" v-if="detail.remark">
|
<view class="caption f-28">
|
小区简介
|
</view>
|
<view class="f-30">
|
{{detail.remark}}
|
</view>
|
</view>
|
<view class="box bgc-ff" v-if="images.length">
|
<view class="caption f-28">
|
小区照片
|
</view>
|
<u-album :urls="images" singleSize="100" multipleSize="100"></u-album>
|
</view>
|
</view>
|
|
</template>
|
|
<script>
|
import {
|
getDistrictDetail
|
} from "@/api/house/house.js"
|
import {
|
minioBaseUrl
|
} from "@/common/setting.js"
|
import {
|
bizDictionary,
|
} from '@/api/system/dict.js'
|
export default {
|
data() {
|
return {
|
detail: {},
|
images: [],
|
branchTypeName: "",
|
organizationTypeName: ""
|
}
|
},
|
|
onLoad() {
|
this.getDetail()
|
},
|
|
methods: {
|
getDetail() {
|
getDistrictDetail({
|
houseCode: uni.getStorageSync("siteInfo").houseCode
|
}).then(res => {
|
this.detail = res.data;
|
if (res.data.picUrl) {
|
this.images = this.setImageUrl(res.data.picUrl);
|
}
|
if (res.data.branchType) {
|
this.getBranchType(res.data.branchType);
|
}
|
if (res.data.organizationType) {
|
this.getOrganizationType(res.data.organizationType)
|
}
|
})
|
},
|
|
setImageUrl(str) {
|
let urls = str.split(",")
|
let temp = [];
|
for (let i of urls) {
|
temp.push(`${minioBaseUrl}${i}`)
|
}
|
return temp
|
},
|
|
|
|
|
getBranchType(val) {
|
bizDictionary({
|
code: "branchType"
|
}).then(res => {
|
if (res.code == 200) {
|
this.branchTypeName = this.getName(res.data, val)
|
}
|
})
|
},
|
|
getOrganizationType(val) {
|
bizDictionary({
|
code: "organizationType"
|
}).then(res => {
|
if (res.code == 200) {
|
this.organizationTypeName = this.getName(res.data, val)
|
}
|
})
|
},
|
|
getName(data, val) {
|
for (let i of data) {
|
if (i.dictKey == val) {
|
return i.dictValue
|
}
|
}
|
}
|
|
|
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
page {
|
background-color: #f5f5f5;
|
}
|
|
.item-row {
|
width: 100%;
|
padding: 30rpx;
|
box-sizing: border-box;
|
border-bottom: 1px solid #f5f5f5;
|
font-size: 28rpx;
|
}
|
|
.address {
|
width: 70%;
|
text-align: right;
|
}
|
|
.box {
|
padding: 0 30rpx;
|
margin-top: 20rpx;
|
}
|
|
.caption {
|
padding: 30rpx 0;
|
}
|
</style>
|