Commit 52325ffe authored by wangjiankun's avatar wangjiankun

feat: 楼盘详情除土拍信息和房屋信息的两个图表其他已变为动态

fix: 地图覆盖物鼠标移入移出的样式 多级表头数据不存在时显示---
parent e906af89
...@@ -2,5 +2,5 @@ NODE_ENV = "development" ...@@ -2,5 +2,5 @@ NODE_ENV = "development"
BASE_URL = "./" BASE_URL = "./"
VUE_APP_PUBLIC_PATH = "./" VUE_APP_PUBLIC_PATH = "./"
VUE_APP_API = "http://10.96.7.150:8080/api/v1/" VUE_APP_API = "http://10.96.4.28:9393/api/v1/"
VUE_APP_OSS_SRC = "https://ss1.bdstatic.com" VUE_APP_OSS_SRC = "https://ss1.bdstatic.com"
...@@ -2,7 +2,7 @@ NODE_ENV = 'production' ...@@ -2,7 +2,7 @@ NODE_ENV = 'production'
BASE_URL = 'https://prod.breaker93.com/' BASE_URL = 'https://prod.breaker93.com/'
VUE_APP_PUBLIC_PATH = './' VUE_APP_PUBLIC_PATH = './'
VUE_APP_API = 'https://prod.breaker93.com/api' VUE_APP_API = 'http://106.2.11.235:38091/api/v1/'
VUE_APP_OSS_SRC = '' VUE_APP_OSS_SRC = ''
ACCESS_KEY_ID = 'xxxxxxxxxxxxx' ACCESS_KEY_ID = 'xxxxxxxxxxxxx'
...@@ -11,4 +11,4 @@ REGION = 'oss-cn-hangzhou' ...@@ -11,4 +11,4 @@ REGION = 'oss-cn-hangzhou'
BUCKET = 'staven-prod' BUCKET = 'staven-prod'
PREFIX = 'staven-blog' PREFIX = 'staven-blog'
outputDir = 'prod' outputDir = 'prod'
\ No newline at end of file
...@@ -18,3 +18,14 @@ export function queryAllRegions() { ...@@ -18,3 +18,14 @@ export function queryAllRegions() {
export function queryPlateByRegion(param) { export function queryPlateByRegion(param) {
return xhr.get('/bnsregion/bns-region/RegionAndProjectSize', param) return xhr.get('/bnsregion/bns-region/RegionAndProjectSize', param)
} }
// 楼盘详情查询
export function queryPropertyDetail(id) {
console.log(id)
return xhr.get('/bnsproject/bns-project/withProjectAndProduct/selectDetils/'+ id)
}
// 根据楼盘Id查询楼盘销售信息---供求数据
export function queryPropertySupplyData(projectId) {
return xhr.get('/bnssale/bns-sale/selectProject', {
projectId
})
}
const map = {
'nxmk': '南向面宽',
'qjsmk': '起居室面宽',
'zwmk': '主卧面宽',
'kwmk': '客卧面宽'
}
// 处理板块数据分析中的 房屋面宽数据 使之对应图表数据结构
export function dealHouseData(data) {
let Arr = []
let columArr = ['roomInfo']
Object.keys(map).forEach(key => {
let save = {}
data.forEach(item => {
if(columArr.length - 1 !== data.length) {
columArr.push(item.production)
}
if(!save.roomInfo) {
save.roomInfo = map[key]
}
save[item.production] = item[key]
})
Arr.push(save)
return {
cloum: columArr,
rows: Arr
}
})
}
// 平均化经纬度坐标并返回
export function averagePosition(array) {
let lng = 0
let lat = 0
array.forEach(item => {
lng += item.longitude
lat += item.latitude
})
return {
longitude: (lng/array.length).toFixed(6),
latitude: (lat/array.length).toFixed(6)
}
}
...@@ -96,7 +96,6 @@ export default { ...@@ -96,7 +96,6 @@ export default {
}, },
computed: { computed: {
routes() { routes() {
console.log(this.$router.options.routes)
return this.$router.options.routes; return this.$router.options.routes;
}, },
}, },
......
...@@ -75,14 +75,8 @@ ...@@ -75,14 +75,8 @@
let result let result
if(res.data.flag === 'plateRegion') { if(res.data.flag === 'plateRegion') {
result = res.data.regionByNames[0] result = res.data.regionByNames[0]
result.lng = result.longitude
result.lat = result.latitude
} else { } else {
result = res.data.projectByName result = res.data.projectByName
result.forEach(item => {
item.lng = item.longitude
item.lat = item.latitude
})
} }
window.eventBus.$emit('searchParamChange', { window.eventBus.$emit('searchParamChange', {
type: res.data.flag, type: res.data.flag,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-carousel :interval="5000" arrow="always" indicator-position="outside" @change="bannerChange"> <el-carousel :interval="5000" arrow="always" indicator-position="outside" @change="bannerChange">
<el-carousel-item class="carouselCenter" v-for="(item, index) in bannerData" :key="index"> <el-carousel-item class="carouselCenter" v-for="(item, index) in bannerData" :key="index">
<viewer :images="[]" :style="{ width: imgWidth + '%', height: '100%', margin: '0 auto' }"> <viewer :images="[]" :style="{ width: imgWidth + '%', height: '100%', margin: '0 auto' }">
<img :src="item.bannerSrc" :style="{ width: '100%', height: '100%' }"> <img :src="item.filePath" :style="{ width: '100%', height: '100%' }">
</viewer> </viewer>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
<bm-overlay <bm-overlay
ref="customOverlay" ref="customOverlay"
pane="labelPane" pane="labelPane"
@mouseenter.native="active = true"
@mouseleave.native="active = false"
:class="{'flex': true}" :class="{'flex': true}"
:style="backGroundType === 'image' ? {} : { width: width + 'px', height: height + 'px', color: textColor, backgroundColor: bgColor, borderRadius: circle }" :style="backGroundType === 'waterDrop' ? {} : { width: width + 'px', height: height + 'px', color: textColor, backgroundColor: active ? activeColor : bgColor , borderRadius: circle }"
@draw="draw"> @draw="draw">
<div <div
:style="{fontSize: fontSize, fontFamily: 'Arial', textAlign: 'center', fontWeight: 'normal'}" :style="{fontSize: fontSize, fontFamily: 'Arial', textAlign: 'center', fontWeight: 'normal'}"
...@@ -19,7 +21,12 @@ ...@@ -19,7 +21,12 @@
<script> <script>
export default { export default {
name: 'overlay', name: 'overlay',
props: ['text', 'position', 'backGroundType', 'textColor', 'bgColor', 'circle', 'width', 'height', 'num', 'fontSize'], props: ['text', 'position', 'backGroundType', 'textColor', 'bgColor', 'circle', 'width', 'height', 'num', 'fontSize', 'activeColor'],
data () {
return {
active: false
}
},
watch: { watch: {
position: { position: {
handler () { handler () {
...@@ -50,10 +57,8 @@ ...@@ -50,10 +57,8 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
filter: grayscale(0%)
} }
.flex:hover{ .flex:hover{
filter: grayscale(50%)
z-index: 9999; z-index: 9999;
} }
.centerImage{ .centerImage{
......
...@@ -28,12 +28,13 @@ ...@@ -28,12 +28,13 @@
<el-row :class="{'dataCell':true, 'prodName': index < 2}">{{item.productionName}}</el-row> <el-row :class="{'dataCell':true, 'prodName': index < 2}">{{item.productionName}}</el-row>
<el-col class="productionDetail" :span="12" v-for="(item2,index) in item.productionProperties" :key="index"> <el-col class="productionDetail" :span="12" v-for="(item2,index) in item.productionProperties" :key="index">
<el-row v-for="(value, key) in dataMap" :key="key" :class="{ 'dataCell': true, 'imgHeigth': value === 'img'}"> <el-row v-for="(value, key) in dataMap" :key="key" :class="{ 'dataCell': true, 'imgHeigth': value === 'img'}">
<div v-if="value === 'string'">{{item2[key] || ''}} <span v-if="key === 'area'">m<sup>2</sup></span> </div> <div v-if="value === 'string'">{{item2[key] || '--'}} <span v-if="key === 'area'">m<sup>2</sup></span> </div>
<viewer :images="[]" v-else-if="value === 'img'"> <viewer :images="[]" v-else-if="value === 'img'">
<img :src="item2[key]" alt="" width="50%" height="80" style="cursor:pointer;"> <img :src="item2[key]" alt="" width="50%" height="80" style="cursor:pointer;">
</viewer> </viewer>
<div v-else-if="value === 'boolean' && item2[key] == 1" class="circle block"></div> <div v-else-if="value === 'boolean' && item2[key] == 1" class="circle block"></div>
<div v-else-if="value === 'boolean' && item2[key] == 0" class="circle hollow"></div> <div v-else-if="value === 'boolean' && item2[key] == 0" class="circle hollow"></div>
<div v-else-if="value === 'boolean' && item2[key] == undefined" class="circle hollow"></div>
</el-row> </el-row>
</el-col> </el-col>
</el-col> </el-col>
...@@ -42,12 +43,13 @@ ...@@ -42,12 +43,13 @@
<div class="table_body" v-else :style="{ width: bodyWidth + '%'}"> <div class="table_body" v-else :style="{ width: bodyWidth + '%'}">
<el-col :span="24" style="min-width: 120px"> <el-col :span="24" style="min-width: 120px">
<el-row v-for="(value, key) in dataMap" :key="key" :class="{ 'dataCell': true, 'imgHeigth': value === 'img' }"> <el-row v-for="(value, key) in dataMap" :key="key" :class="{ 'dataCell': true, 'imgHeigth': value === 'img' }">
<div v-if="value === 'string'">{{tableData[key] || ''}}</div> <div v-if="value === 'string'">{{tableData[key] || '--'}}</div>
<viewer :images="[]" v-else-if="value === 'img'"> <viewer :images="[]" v-else-if="value === 'img'">
<img :src="tableData[key] ? tableData[key] : tableData['bannerSrc']" alt="" width="30%" height="80" style="cursor:pointer;"> <img :src="tableData[key] ? tableData[key] : tableData['bannerSrc']" alt="" width="30%" height="80" style="cursor:pointer;">
</viewer> </viewer>
<div v-else-if="value === 'boolean' && tableData[key] == 1" class="circle block"></div> <div v-else-if="value === 'boolean' && tableData[key] == 1" class="circle block"></div>
<div v-else-if="value === 'boolean' && tableData[key] == 0" class="circle hollow"></div> <div v-else-if="value === 'boolean' && tableData[key] == 0" class="circle hollow"></div>
<div v-else-if="value === 'boolean' && tableData[key] == undefined" >--</div>
</el-row> </el-row>
</el-col> </el-col>
</div> </div>
...@@ -78,38 +80,41 @@ ...@@ -78,38 +80,41 @@
data () { data () {
return { return {
dataMap :{ dataMap :{
area: 'string', 'unitArea': 'string',
hxImg: 'img', 'filePath': 'img',
kj: 'string', 'bayNumber': 'string',
js: 'string', 'roomNumber': 'string',
ting: 'string', 'hallNumber': 'string',
wsj: 'string', 'toiletNumber': 'string',
nxmk: 'string', 'southWidth': 'string',
qjsmk: 'string', 'liveRoomWidth': 'string',
zwmk: 'string', 'masterRoomWidth': 'string',
kwmk: 'string', 'guestRoomWidth': 'string',
QJSDGHT: 'boolean', 'liveRoom-largeHorizontalHall': 'boolean', // 起居室
QJSWSYT: 'boolean', 'liveRoom-balcony': 'boolean',
QJSLDK: 'boolean', 'liveRoom-LDK': 'boolean',
ZWZW: 'boolean', 'masterRoom-masterBathRoom': 'boolean', // 主卧
ZWYMJ: 'boolean', 'masterRoom-cloakRoom': 'boolean',
KWKW: 'boolean', 'masterRoom-brightBathRoom': 'boolean',
CFLDK: 'boolean', 'masterRoom-dryWetDepart': 'boolean',
CFZXCFL: 'boolean', 'masterRoom-function': 'string',
CFDLDX: 'boolean', 'guestRoom-guestBathRoom': 'boolean', // 客卧
CFXS: 'string', 'kitchen-LDK': 'boolean', // 厨房
CTLDK: 'boolean', 'kitchen-SCWesternCook': 'boolean',
CTDLKC: 'boolean', 'kitchen-hallwayCFDX': 'boolean',
SF: 'string', 'kitchen-kitchenStyle': 'string',
WSJMW: 'boolean', 'restaurant-LDK': 'boolean', // 餐厅
WSJGSFL: 'boolean', 'restaurant-independentWindow': 'boolean',
WSJGN: 'string', 'bookRoom-wideHallSingleGuard': 'string', // 书房
YT: 'boolean', 'restRoom-masterBathRoom': 'boolean', // 卫生间
YTWZ: 'string', 'restRoom-dryWetDepart': 'boolean',
CCJ: 'boolean', 'restRoom-function': 'string',
JZJ: 'boolean', 'balcony-designHalcony': 'boolean', // 阳台
XG: 'boolean', 'balcony-location': 'string',
XGCFDX: 'boolean' 'storeRoom-designStoreRoom': 'boolean', //储藏间
'houseSpace-designHouseSpace': 'boolean', // 家政间
'hallway-designHallway': 'boolean', // 玄关
'hallway-designHallwayCFDX': 'boolean'
} }
} }
} }
...@@ -160,7 +165,7 @@ ...@@ -160,7 +165,7 @@
line-height 85px line-height 85px
} }
.dealHeigth{ .dealHeigth{
line-height 34px line-height 32px
} }
} }
.table_body { .table_body {
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
<section class="ProductAnalysis"> <section class="ProductAnalysis">
<div class="header"> <div class="header">
<el-col :span="4"> <el-col :span="4">
<el-select v-model="regionVal" placeholder="行政区"> <el-select v-model="regionVal" @change="changePlateForRegion" placeholder="行政区">
<el-option <el-option
v-for="item in regionOptions" v-for="item in regionOptions"
:key="item.value" :key="item.adminRegionId"
:label="item.label" :label="item.adminRegionName"
:value="item.value"> :value="item.adminRegionName">
</el-option> </el-option>
</el-select> </el-select>
</el-col> </el-col>
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
<el-select v-model="plateVal" placeholder="板块名"> <el-select v-model="plateVal" placeholder="板块名">
<el-option <el-option
v-for="item in plateOptions" v-for="item in plateOptions"
:key="item.value" :key="item.regionId"
:label="item.label" :label="item.regionName"
:value="item.value"> :value="item.regionName">
</el-option> </el-option>
</el-select> </el-select>
</el-col> </el-col>
...@@ -143,6 +143,7 @@ ...@@ -143,6 +143,7 @@
import tableHeader from "./tableHeader"; import tableHeader from "./tableHeader";
import multiHeaderTable from '@comp/multilHeaderTable' import multiHeaderTable from '@comp/multilHeaderTable'
import { demoData } from "./tableHeader"; import { demoData } from "./tableHeader";
import { getRegionPlate } from "../../assets/js/api/plateSupplyManage";
export default { export default {
name: "ProductAnalysis", name: "ProductAnalysis",
components:{ components:{
...@@ -218,21 +219,34 @@ ...@@ -218,21 +219,34 @@
plateOptions: [], plateOptions: [],
plateVal: '', plateVal: '',
timeOptions: [], timeOptions: [],
timeVal: '', timeVal: 2020,
houseTypeOptions: [], houseTypeOptions: [],
houseTypeVal: '', houseTypeVal: '',
areaInterval: '', areaInterval: '',
areaIntervalData: [], areaIntervalData: [],
showMode: 0, showMode: 0,
colorsArr: colors, colorsArr: colors,
headerTable: tableHeader headerTable: tableHeader,
plateMap: {
}
}
},
methods: {
changePlateForRegion (region) {
this.plateVal = ''
if(this.plateMap[region] && this.plateMap[region].length > 0) {
this.plateOptions = this.plateMap[region]
} else {
this.plateOptions = []
}
} }
}, },
created() { created() {
window.eventBus.$on('searchParamChange', (houseData) => { window.eventBus.$on('searchParamChange', (searchResult) => {
this.$router.push({ this.$router.push({
path: '/regionalPlate', path: '/regionalPlate',
query: houseData query: searchResult
}) })
}) })
}, },
...@@ -240,7 +254,29 @@ ...@@ -240,7 +254,29 @@
demo () { demo () {
return demoData return demoData
} }
},
beforeMount() {
for(let i = 2000; i<= 2020; i++) {
this.timeOptions.push({
value: i,
label: i + '年'
})
}
getRegionPlate().then(res => {
this.regionOptions = res.data
res.data.forEach(item => {
if(!this.plateMap[item.adminRegionName]) {
this.plateMap[item.adminRegionName] = item.resultRegionDTOS
}
if(item.resultRegionDTOS && item.resultRegionDTOS.length > 0 && !this.regionVal && !this.plateVal) {
this.plateOptions = item.resultRegionDTOS
this.regionVal = item.adminRegionName
this.plateVal = item.resultRegionDTOS[0].regionName
}
})
})
} }
} }
</script> </script>
......
...@@ -50,7 +50,10 @@ export default [ ...@@ -50,7 +50,10 @@ export default [
trName: '主卧', trName: '主卧',
children: [ children: [
{ trName: '主卫' }, { trName: '主卫' },
{ trName: '衣帽间' } { trName: '衣帽间' },
{ trName: '明卫' },
{ trName: '是否干湿分离' },
{ trName: '功能' },
] ]
}, },
{ {
...@@ -340,37 +343,3 @@ export const demoData = [ ...@@ -340,37 +343,3 @@ export const demoData = [
] ]
}, },
] ]
export const demoDataObject = {
area: '100',
hxImg: require('@assets/img/zlhx.png'),
kj: '3',
js: '3',
ting: '3',
wsj: '3',
nxmk: '3',
qjsmk: '3',
zwmk: '3',
kwmk: '3',
QJSDGHT: 1,
QJSWSYT: 1,
QJSLDK: 0,
ZWZW: 0,
ZWYMJ: 0,
KWKW: 1,
CFLDK: 0,
CFZXCFL: 1,
CFDLDX: 1,
CFXS: 'L型',
CTLDK: 1,
CTDLKC: 1,
SF: '大宽厅',
WSJMW: 1,
WSJGSFL: 1,
WSJGN: '三件套',
YT: 1,
YTWZ: '起居室',
CCJ: 1,
JZJ: 1,
XG: 1,
XGCFDX: 1
}
export const regionData = [ export const regionData = [
{ {
lng: 117.200, longitude: 117.200,
lat: 39.133, latitude: 39.133,
text: '西青区', text: '西青区',
number: 0 number: 0
}, },
{ {
lng: 117.100, longitude: 117.100,
lat: 39.233, latitude: 39.233,
text: '行政区2', text: '行政区2',
number: 5, number: 5,
children: [ children: [
{ {
lng: 117.107, longitude: 117.107,
lat: 39.228, latitude: 39.228,
text: '第一板块', text: '第一板块',
number: 2, number: 2,
radius: 1500, radius: 1500,
children: [ resultBnsProjectDTOS: [
{ {
lng: 117.106, longitude: 117.106,
lat: 39.2281, latitude: 39.2281,
text: '楼盘1', text: '楼盘1',
state: 0 state: 0
}, },
{ {
lng: 117.1074, longitude: 117.1074,
lat: 39.2286, latitude: 39.2286,
text: '楼盘2', text: '楼盘2',
state: 1 state: 1
} }
] ]
}, },
{ {
lng: 117.104, longitude: 117.104,
lat: 39.217, latitude: 39.217,
text: '第二板块', text: '第二板块',
number: 2, number: 2,
radius: 1500, radius: 1500,
children: [ resultBnsProjectDTOS: [
{ {
lng: 117.1048, longitude: 117.1048,
lat: 39.2168, latitude: 39.2168,
text: '楼盘1', text: '楼盘1',
state: 1 state: 1
}, },
{ {
lng: 117.105, longitude: 117.105,
lat: 39.2167, latitude: 39.2167,
text: '楼盘2', text: '楼盘2',
state: 1 state: 1
} }
...@@ -56,8 +56,8 @@ export const regionData = [ ...@@ -56,8 +56,8 @@ export const regionData = [
] ]
}, },
{ {
lng: 117.300, longitude: 117.300,
lat: 39.333, latitude: 39.333,
text: '行政区3', text: '行政区3',
number: 0 number: 0
} }
......
...@@ -15,13 +15,14 @@ ...@@ -15,13 +15,14 @@
@click.native.stop="setShowToPlate(item)" @click.native.stop="setShowToPlate(item)"
:key="index + 'region'" :key="index + 'region'"
v-for="(item,index) in dataType.region" v-for="(item,index) in dataType.region"
:position="{lng: item.lng, lat: item.lat}" :position="{lng: item.longitude, lat: item.latitude}"
:back-ground-type="'color'" :back-ground-type="'color'"
:text="item.text" :text="item.text"
:num="item.number" :num="item.number"
:text-color="'#ffffff'" :text-color="'#ffffff'"
:fontSize="16" :fontSize="16"
:bg-color="'rgb(25,124,230)'" :bg-color="'rgba(25,124,230, 0.6)'"
:active-color="'rgba(25,124,230,1)'"
:bg-img-url="null" :bg-img-url="null"
:circle="'50%'" :circle="'50%'"
:width="90" :width="90"
...@@ -33,40 +34,31 @@ ...@@ -33,40 +34,31 @@
@click.native.stop="setShowToPlateRegion(item, 'plateRegion')" @click.native.stop="setShowToPlateRegion(item, 'plateRegion')"
:key="index + 'plate'" :key="index + 'plate'"
v-for="(item,index) in dataType.plate" v-for="(item,index) in dataType.plate"
:position="{lng: item.lng, lat: item.lat}" :position="{lng: item.longitude, lat: item.latitude}"
:back-ground-type="'color'" :back-ground-type="'color'"
:text="item.text" :text="item.text"
:num="item.number" :num="item.number"
:fontSize="14" :fontSize="14"
:text-color="'#ffffff'" :text-color="'#ffffff'"
:bg-color="'rgb(25,124,230)'" :bg-color="'rgba(25,124,230,0.6)'"
:active-color="'rgba(25,124,230,1)'"
:bg-img-url="null" :bg-img-url="null"
:circle="'50%'" :circle="'50%'"
:width="70" :width="70"
:height="70" :height="70"
></my-overlay> ></my-overlay>
<!-- 蓝色圆形组件=======楼盘-->
<bm-circle
:fill-color="'rgb(224,234,244)'"
:stroke-color="'rgb(43,115,175)'"
v-show="showType === 'plateRegion'"
:center="circleCenter"
:radius="radius"
stroke-color="blue"
:stroke-opacity="1"
:fill-opacity="0"
:stroke-weight="1"></bm-circle>
<my-overlay <my-overlay
v-show="showType === 'plateRegion' && state !== '' ? ( state === 'all' ? true : ( state == item.state ? true : false ) ) : false" v-show="showType === 'plateRegion' && state !== '' ? ( state === 'all' ? true : ( state == item.state ? true : false ) ) : false"
@click.native="ShowInfo(item)" @click.native="ShowInfo(item)"
:key="index + 'plateRegion'" :key="index + 'plateRegion'"
v-for="(item,index) in dataType.plateRegion.resultBnsProjectDTOS" v-for="(item,index) in dataType.plateRegion.resultBnsProjectDTOS"
:position="{lng: item.lng, lat: item.lat}" :position="{lng: item.longitude, lat: item.latitude}"
:back-ground-type="'color'" :back-ground-type="'color'"
:text="item.text" :text="item.text"
:fontSize="12" :fontSize="12"
:text-color="'#ffffff'" :text-color="'#ffffff'"
:bg-color="item.state === 0 ? 'rgb(25,124,230)' : 'rgb(169,209,142)'" :bg-color="item.state === 0 ? 'rgb(25,124,230,0.6)' : 'rgb(169,209,142,0.6)'"
:active-color="item.state === 0 ? 'rgb(25,124,230,1)' : 'rgb(169,209,142,1)'"
:bg-img-url="null" :bg-img-url="null"
:circle="'10px'" :circle="'10px'"
:width="80" :width="80"
...@@ -82,7 +74,7 @@ ...@@ -82,7 +74,7 @@
@click.native="showTowerInfo(item)" @click.native="showTowerInfo(item)"
:key="index + 'property'" :key="index + 'property'"
v-for="(item,index) in dataType.property" v-for="(item,index) in dataType.property"
:position="{lng: item.lng, lat: item.lat}" :position="{lng: item.longitude, lat: item.latitude}"
:back-ground-type="'waterDrop'" :back-ground-type="'waterDrop'"
:text="item.name" :text="item.name"
:text-color="'#ffffff'" :text-color="'#ffffff'"
...@@ -110,7 +102,7 @@ ...@@ -110,7 +102,7 @@
{{item.title}} {{item.title}}
</div> </div>
<div :class="{'plateRegionDetailShowContainer': true }"> <div :class="{'plateRegionDetailShowContainer': true }">
{{dataType.plateRegion[item.prop] || ''}} {{dataType.plateRegion[item.prop] || '---'}}
</div> </div>
</el-col> </el-col>
</div> </div>
...@@ -153,13 +145,13 @@ ...@@ -153,13 +145,13 @@
<div v-else-if="showType === 'property'" class="dealWidth"> <div v-else-if="showType === 'property'" class="dealWidth">
<div class="searchDetailFlex"> <div class="searchDetailFlex">
<img style="cursor: pointer" @click="toPropertyDetail" height="200" :src="require('@assets/img/loupan.png')" alt=""> <img style="cursor: pointer" @click="toPropertyDetail" height="200" :src="require('@assets/img/loupan.png')" alt="">
<p @click="toPropertyDetail" class="propertyName">{{propertyDetailData.name || '楼房名称'}}</p> <p @click="toPropertyDetail" class="propertyName">{{propertyDetailData.name || '---'}}</p>
<p class="propertyDetail" v-html="'价格'+':' + propertyDetailData.price + '/m<sup>2</sup>'"></p> <p class="propertyDetail" v-html="'价格'+':' + propertyDetailData.price + '/m<sup>2</sup>'"></p>
<p class="propertyDetail">{{'产品类型'+ ':' + propertyDetailData.productType}}</p> <p class="propertyDetail">{{'产品类型'+ ':' + propertyDetailData.productType}}</p>
<p class="propertyDetail" <p class="propertyDetail"
v-for="(val, key, index) in propertyDetailDataMap" v-for="(val, key, index) in propertyDetailDataMap"
:key="index" :key="index"
v-html="val + ':' +propertyDetailData[key]"> v-html="val.name + ':' + (propertyDetailData[key] || '---') + val.defaultSetting">
</p> </p>
</div> </div>
</div> </div>
...@@ -178,6 +170,7 @@ ...@@ -178,6 +170,7 @@
import MyOverlay from '@comp/mapOverlay' import MyOverlay from '@comp/mapOverlay'
import propertyControll from '@comp/propertyControll' import propertyControll from '@comp/propertyControll'
import { queryAllRegions } from "../../assets/js/api/unitManage"; import { queryAllRegions } from "../../assets/js/api/unitManage";
import { averagePosition} from "../../assets/js/public";
export default { export default {
name: 'RegionalPlate', name: 'RegionalPlate',
components: { components: {
...@@ -203,11 +196,6 @@ ...@@ -203,11 +196,6 @@
}, // 四种的楼房显示类型 数据预览 }, // 四种的楼房显示类型 数据预览
allData: [], allData: [],
showType: 'region', // 控制楼房显示的变量 showType: 'region', // 控制楼房显示的变量
circleCenter: {
lng: 0,
lat: 0
}, // 若为板块区域详情,圆环的坐标点中心
radius: 1000, // 若为板块区域详情、圆环的半径
zoomType: { zoomType: {
region: 11, region: 11,
plate: 12, plate: 12,
...@@ -225,10 +213,22 @@ ...@@ -225,10 +213,22 @@
propertyDetailData: { propertyDetailData: {
}, // 搜索后点击楼盘 展示详情数据 }, // 搜索后点击楼盘 展示详情数据
propertyDetailDataMap: { propertyDetailDataMap: {
landArea: '占地面积', landArea: {
totalArea: '建筑面积', name: '占地面积',
plotRatio: '容积率', defaultSetting: 'm<sup>2</sup>'
openTime: '开盘时间' },
totalArea: {
name: '建筑面积',
defaultSetting: 'm<sup>2</sup>'
},
plotRatio: {
name: '容积率',
defaultSetting: ''
},
openTime: {
name: '开盘时间',
defaultSetting: ''
}
} // key/value 对应 } // key/value 对应
} }
}, },
...@@ -242,13 +242,13 @@ ...@@ -242,13 +242,13 @@
ShowInfo (item) { ShowInfo (item) {
this.$router.push({ this.$router.push({
path: '/propertiesDetail', path: '/propertiesDetail',
query: item query: { propertyId: item.businessId }
}) })
}, },
toPropertyDetail() { toPropertyDetail() {
this.$router.push({ this.$router.push({
path: '/propertiesDetail', path: '/propertiesDetail',
query: this.propertyDetailData query: { propertyId: this.propertyDetailData.businessId }
}) })
}, },
showTowerInfo(item) { showTowerInfo(item) {
...@@ -265,19 +265,18 @@ ...@@ -265,19 +265,18 @@
return return
} }
this.showType = 'plate' this.showType = 'plate'
this.map.center.lng = item.lng this.map.center.lng = item.longitude
this.map.center.lat = item.lat this.map.center.lat = item.latitude
this.map.setZoom = this.zoomType['plate'] this.map.setZoom = this.zoomType['plate']
this.dataType['plate'] = item.children ? item.children : [] this.dataType['plate'] = item.children ? item.children : []
}, },
setShowToPlateRegion (item) { setShowToPlateRegion (item) {
console.log(item)
this.showType = 'plateRegion' this.showType = 'plateRegion'
this.map.center.lng = item.lng this.map.center.lng = item.longitude
this.map.center.lat = item.lat this.map.center.lat = item.latitude
this.map.setZoom = this.zoomType['plateRegion'] this.map.setZoom = this.zoomType['plateRegion']
this.dataType['plateRegion'] = item.children ? item.children : [] this.dataType['plateRegion'].resultBnsProjectDTOS = item.resultBnsProjectDTOS ? item.resultBnsProjectDTOS : []
this.circleCenter = { lng: item.lng, lat: item.lat }
this.radius = item.radius ? item.radius : 1000
this.detailShow = true this.detailShow = true
}, },
zoomChanged ({type, target}) { zoomChanged ({type, target}) {
...@@ -294,26 +293,30 @@ ...@@ -294,26 +293,30 @@
return type return type
}, },
mapLoaded () { mapLoaded () {
if(this.$router.query) { if(this.$route.query) {
console.log(this.$router.query) const searchResult = this.$route.query
if(searchResult.type === 'plateRegion') {
this.showType = 'plateRegion'
this.map.center.lng = searchResult.data.longitude
this.map.center.lat = searchResult.data.latitude
this.map.setZoom = this.zoomType.plateRegion
this.dataType.plateRegion = searchResult.data
console.log(this.dataType.plateRegion)
} else {
this.showType = 'property'
this.map.center.lng = averagePosition(searchResult.data).longitude
this.map.center.lat = averagePosition(searchResult.data).latitude
this.map.setZoom = this.zoomType.property
this.dataType.property = searchResult.data
this.propertyDetailData = this.dataType.property[0]
console.log(this.propertyDetailData)
}
} else { } else {
// 若无传递值 则查询全部行政区及其下属数目信息 // 若无传递值 则查询全部行政区及其下属数目信息
queryAllRegions().then(res => { queryAllRegions().then(res => {
console.log(res) console.log(res)
}) })
} }
},
average (array) {
let lng = 0
let lat = 0
array.forEach(item => {
lng += item.lng
lat += item.lat
})
return {
lng: (lng/array.length).toFixed(6),
lat: (lat/array.length).toFixed(6)
}
} }
}, },
mounted() { mounted() {
...@@ -326,17 +329,15 @@ ...@@ -326,17 +329,15 @@
window.eventBus.$on('searchParamChange', (searchResult) => { window.eventBus.$on('searchParamChange', (searchResult) => {
if(searchResult.type === 'plateRegion') { if(searchResult.type === 'plateRegion') {
this.showType = 'plateRegion' this.showType = 'plateRegion'
this.map.center.lng = searchResult.data.lng this.map.center.lng = searchResult.data.longitude
this.map.center.lat = searchResult.data.lat this.map.center.lat = searchResult.data.latitude
this.circleCenter = { lng: searchResult.data.lng, lat: searchResult.data.lat }
this.circle = 1000
this.map.setZoom = this.zoomType.plateRegion this.map.setZoom = this.zoomType.plateRegion
this.dataType.plateRegion = searchResult.data this.dataType.plateRegion = searchResult.data
console.log(this.dataType.plateRegion) console.log(this.dataType.plateRegion)
} else { } else {
this.showType = 'property' this.showType = 'property'
this.map.center.lng = this.average(searchResult.data).lng this.map.center.lng = averagePosition(searchResult.data).longitude
this.map.center.lat = this.average(searchResult.data).lat this.map.center.lat = averagePosition(searchResult.data).latitude
this.map.setZoom = this.zoomType.property this.map.setZoom = this.zoomType.property
this.dataType.property = searchResult.data this.dataType.property = searchResult.data
this.propertyDetailData = this.dataType.property[0] this.propertyDetailData = this.dataType.property[0]
......
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
colorArr: colors, colorArr: colors,
plateMap: { plateMap: {
} } // 行政区名称对应
} }
}, },
methods: { methods: {
...@@ -153,8 +153,7 @@ ...@@ -153,8 +153,7 @@
this.plateVal = '' this.plateVal = ''
if(this.plateMap[region] && this.plateMap[region].length > 0) { if(this.plateMap[region] && this.plateMap[region].length > 0) {
this.plateOptions = this.plateMap[region] this.plateOptions = this.plateMap[region]
} } else {
else {
this.plateOptions = [] this.plateOptions = []
} }
} }
...@@ -180,7 +179,15 @@ ...@@ -180,7 +179,15 @@
}) })
this.getSupplyData() this.getSupplyData()
}) })
} },
created() {
window.eventBus.$on('searchParamChange', (searchResult) => {
this.$router.push({
path: '/regionalPlate',
query: searchResult
})
})
},
} }
</script> </script>
......
<template> <template>
<section class="propertiesMain"> <section class="propertiesMain" v-loading="propertyLoading">
<header class="header"> <header class="header">
<div class="back"> <div class="back">
<el-link type="primary" @click="$router.go(-1)">返回</el-link> <el-link type="primary" @click="$router.go(-1)">返回</el-link>
</div> </div>
<div class="name"> <div class="name">
{{propertyData.propertyName}} {{propertyData.projectInformation.name}}
</div> </div>
<div class="bannerOptions"> <div class="bannerOptions">
<el-radio-group v-model="bannerType"> <el-radio-group v-model="bannerType">
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<banner :banner-data="propertyData.propertyBanner.lmBanner"/> <banner :banner-data="propertyData.propertyBanner.lmBanner"/>
</div> </div>
<div v-if="bannerType === 2"> <div v-if="bannerType === 2">
<banner :img-width="20" @bannerChange="saleingChange" :banner-data="propertyData.propertyBanner.hxBanner" /> <banner :img-width="100" @bannerChange="saleingChange" :banner-data="propertyData.propertyBanner.hxBanner" />
</div> </div>
</div> </div>
<!-- 户型信息 只在banner类型为户型时才显示--> <!-- 户型信息 只在banner类型为户型时才显示-->
...@@ -39,7 +39,15 @@ ...@@ -39,7 +39,15 @@
<div class="planningInformation"> <div class="planningInformation">
<div class="title">规划信息</div> <div class="title">规划信息</div>
<div class="container"> <div class="container">
<el-tag :key="index" effect="dark" v-for="(item,index) in propertyData.propertyPlaningInfo" type="info" v-html="item.title" class="tagsInfo"></el-tag> <el-tag :key="key"
effect="dark"
v-for="(val,key) in planingInfoMap"
type="primary" class="tagsInfo"
v-html="val.name + ':' +
(typeof val.defaultSetting === 'function' ?
val.defaultSetting(propertyData.projectInformation[key]) :
(propertyData.projectInformation[key] || '---') + val.defaultSetting )">
</el-tag>
</div> </div>
</div> </div>
<!-- 土拍信息--> <!-- 土拍信息-->
...@@ -156,22 +164,17 @@ ...@@ -156,22 +164,17 @@
import html2canvas from "html2canvas" import html2canvas from "html2canvas"
import multiHeaderTable from '@comp/multilHeaderTable' import multiHeaderTable from '@comp/multilHeaderTable'
import tableHeader from "../ProductAnalysis/tableHeader" import tableHeader from "../ProductAnalysis/tableHeader"
import { queryPropertyDetail, queryPropertySupplyData } from "../../assets/js/api/unitManage";
export default { export default {
name: "propertiesDetail", name: "propertiesDetail",
components: {banner, multiHeaderTable}, components: {banner, multiHeaderTable},
data () { data () {
return { return {
bannerType: 0, bannerType: 0,
propertyId: '',
supplySaleData: { supplySaleData: {
columns: ['areaRange', 'supplyProportion', 'dealProportion'], columns: ['areaRange', 'supplyProportion', 'dealProportion'],
rows: [ rows: []
{ 'areaRange': '80-90', 'supplyProportion': 0.08, 'dealProportion': 0.9, },
{ 'areaRange': '90-100', 'supplyProportion': 0.04, 'dealProportion': 0.05 },
{ 'areaRange': '100-110', 'supplyProportion': 0.04, 'dealProportion': 0.05 },
{ 'areaRange': '110-120', 'supplyProportion': 0.07, 'dealProportion': 0.05 },
{ 'areaRange': '120-130', 'supplyProportion': 0.09, 'dealProportion': 0.05 },
{ 'areaRange': '130-140', 'supplyProportion': 0.03, 'dealProportion': 0.05 }
]
}, // 供应比例、套数 图表数据 }, // 供应比例、套数 图表数据
supplySaleSettings: { supplySaleSettings: {
yAxisType: ['percent'], yAxisType: ['percent'],
...@@ -185,44 +188,40 @@ ...@@ -185,44 +188,40 @@
supplySaleDataDetail: { supplySaleDataDetail: {
areaRange: { areaRange: {
name: '面积区间', name: '面积区间',
data: ['80-90', '90-100', '100-110', '110-120', '120-130', '130-140'] data: []
}, },
supplyNum: { supplyNum: {
name: '供应数量', name: '供应数量',
data: [10000, 20000, 30000, 40000, 50000, 60000] data: []
}, },
dealNum: { dealNum: {
name: '成交数量', name: '成交数量',
data: [8000, 16000, 24000, 32000, 40000, 48000] data: []
} }
}, // 供应比例、套数 表格数据 }, // 供应比例、套数 表格数据
// 供求比 图表设置
supplyDemandRatioSettings: { supplyDemandRatioSettings: {
labelMap: { labelMap: {
areaRange: '面积区间', areaRange: '面积区间',
Rate: '供求比' rate: '供求比'
} }
}, // 供求比 图表设置 },
// 供求比 图表数据
supplyDemandRatioData: { supplyDemandRatioData: {
columns: ['areaRange', 'Rate'], columns: ['areaRange', 'rate'],
rows: [ rows: []
{ 'areaRange': '80-90', 'Rate': 1 }, },
{ 'areaRange': '90-100', 'Rate': 2 }, // 供求比 表格数据
{ 'areaRange': '100-110', 'Rate': 0.1 },
{ 'areaRange': '110-120', 'Rate': 0.5 },
{ 'areaRange': '120-130', 'Rate': 0.7 },
{ 'areaRange': '130-140', 'Rate': 1.5 }
]
}, // 供求比 图表数据
supplyDemandRatioDataDetail:{ supplyDemandRatioDataDetail:{
areaRange: { areaRange: {
name: '面积区间', name: '面积区间',
data: ['80-90', '90-100', '100-110', '110-120', '120-130', '130-140'] data: []
}, },
Rate: { rate: {
name: '供求比', name: '供求比',
data: [0.8, 0.8 ,0.8, 0.8, 0.8, 0.8] data: []
}, },
}, // 供求比 表格数据 },
supplySettings: { supplySettings: {
labelMap: { labelMap: {
production: '产品类型', production: '产品类型',
...@@ -248,6 +247,7 @@ ...@@ -248,6 +247,7 @@
'squareMetersFor140': '143平' 'squareMetersFor140': '143平'
} }
}, },
// 房屋面宽信息图表
supplyDataDetail: { supplyDataDetail: {
columns: ['roomInfo', 'squareMetersFor85', 'squareMetersFor95', 'squareMetersFor97', 'squareMetersFor103', 'squareMetersFor123', 'squareMetersFor140'], columns: ['roomInfo', 'squareMetersFor85', 'squareMetersFor95', 'squareMetersFor97', 'squareMetersFor103', 'squareMetersFor123', 'squareMetersFor140'],
rows: [ rows: [
...@@ -257,6 +257,7 @@ ...@@ -257,6 +257,7 @@
{ 'roomInfo': '客卧面宽', 'squareMetersFor85': 0, 'squareMetersFor97': 0, 'squareMetersFor95': 0, 'squareMetersFor103': 3, 'squareMetersFor123': 3, 'squareMetersFor140': 3 } { 'roomInfo': '客卧面宽', 'squareMetersFor85': 0, 'squareMetersFor97': 0, 'squareMetersFor95': 0, 'squareMetersFor103': 3, 'squareMetersFor123': 3, 'squareMetersFor140': 3 }
] ]
}, },
// 房屋面宽表格信息
supplyTableData: [ supplyTableData: [
{ production: '85平', nxmk: 10.1, qjsmk: 10.5, zwmk: 15, kwmk: 13 }, { production: '85平', nxmk: 10.1, qjsmk: 10.5, zwmk: 15, kwmk: 13 },
{ production: '97平', nxmk: 10.1, qjsmk: 10.5, zwmk: 15, kwmk: 13 }, { production: '97平', nxmk: 10.1, qjsmk: 10.5, zwmk: 15, kwmk: 13 },
...@@ -268,145 +269,68 @@ ...@@ -268,145 +269,68 @@
colorArr: colors, colorArr: colors,
hxObjectData: [], hxObjectData: [],
propertyData: { propertyData: {
propertyName: '这里为楼盘名字', projectInformation: {
name: ''
},
propertyBanner: { propertyBanner: {
ztBanner: [ ztBanner: [],
{ lmBanner: [],
name: '123', hxBanner: []
bannerSrc: require('@assets/img/zt.png')
},
{
name: '233',
bannerSrc: require('@assets/img/zt.png')
}
],
lmBanner: [
{
name: '122',
bannerSrc: require('@assets/img/lm.png')
},
{
name: '122',
bannerSrc: require('@assets/img/lm.png')
},
{
name: '122',
bannerSrc: require('@assets/img/lm.png')
}
],
hxBanner: [
{
area: '100',
bannerSrc: require('@assets/img/zlhx.png'),
kj: '3',
js: '3',
ting: '3',
wsj: '3',
nxmk: '3',
qjsmk: '3',
zwmk: '3',
kwmk: '3',
QJSDGHT: 1,
QJSWSYT: 1,
QJSLDK: 0,
ZWZW: 0,
ZWYMJ: 0,
KWKW: 1,
CFLDK: 0,
CFZXCFL: 1,
CFDLDX: 1,
CFXS: 'L型',
CTLDK: 1,
CTDLKC: 1,
SF: '大宽厅',
WSJMW: 1,
WSJGSFL: 1,
WSJGN: '三件套',
YT: 1,
YTWZ: '起居室',
CCJ: 1,
JZJ: 1,
XG: 1,
XGCFDX: 1
},
{
area: '123',
bannerSrc: require('@assets/img/zlhx.png'),
kj: '3',
js: '2',
ting: '2',
wsj: '2',
nxmk: '2',
qjsmk: '2',
zwmk: '3',
kwmk: '1',
QJSDGHT: 0,
QJSWSYT: 1,
QJSLDK: 1,
ZWZW: 1,
ZWYMJ: 1,
KWKW: 1,
CFLDK: 0,
CFZXCFL: 0,
CFDLDX: 0,
CFXS: 'S型',
CTLDK: 1,
CTDLKC: 1,
SF: '客卫',
WSJMW: 1,
WSJGSFL: 1,
WSJGN: '两件套',
YT: 1,
YTWZ: '主卧',
CCJ: 0,
JZJ: 1,
XG: 0,
XGCFDX: 1
}
]
}, },
propertyPlaningInfo: [ propertyPlaningInfo: [],
{ propertySoildInfo: []
title: '总面积100000m<sup>2</sup>' },
}, propertyFunctionMap: {
{ y: 1,
title: '地铁站附近' n: 0,
} lRoom: '起居室',
], wRoom: '卧室',
propertySoildInfo: [ singleGuard: '独卫',
{ wideHall: '大宽厅',
soildName: '永红桥附近', L: 'L型',
soildTableData: [{ U: 'U型',
region: '西青区', misLand: '中岛',
area: '所属区域', suit3: '三件套',
landArea: '土地面积', suit4: '四件套',
lotRatio: '容积率', other: '其他',
builtArea: '建筑面积', null: undefined
floorPrice: '楼面价元', },
buildingDensity: '建筑密度', propertyLoading: false,
closingDate: '成交日期', planingInfoMap: {
totalPrice: '成交价', landArea: {
premium: '溢价', name: '占地面积',
transferee: '受让方', defaultSetting: 'm<sup>2</sup>'
}] },
}, totalArea: {
{ name: '建筑面积',
soildName: '南站附近', defaultSetting: 'm<sup>2</sup>'
soildTableData: [{ },
region: '西青区', plotRatio: {
area: '所属区域', name: '容积率',
landArea: '土地面积', defaultSetting: '%'
lotRatio: '容积率', },
builtArea: '建筑面积', producType: {
floorPrice: '楼面价元', name: '产品类型',
buildingDensity: '建筑密度', defaultSetting (val) {
closingDate: '成交日期', if(val) {
totalPrice: '成交价', return val.replace(/,/g, '+')
premium: '溢价', } else {
transferee: '受让方', return '---'
}] }
} }
] },
totalHousehold: {
name: '总户数',
defaultSetting: '户'
},
developer: {
name: '开发商',
defaultSetting: ''
},
estateManage: {
name: '物业管理',
defaultSetting: ''
},
} }
} }
}, },
...@@ -438,6 +362,89 @@ ...@@ -438,6 +362,89 @@
}, },
saleingChange (item) { saleingChange (item) {
this.hxObjectData = item this.hxObjectData = item
},
getPropertyDetail() {
queryPropertyDetail(this.propertyId).then(res => {
this.propertyLoading = true
if(res.data) {
this.propertyData.projectInformation = res.data.bnsProject
try {
this.propertyData.propertyBanner.ztBanner = res.data.projectTotalImgList.map(item => {
return {
filePath: 'data:image/png;base64,'+ item.filePath
}
})
this.propertyData.propertyBanner.lmBanner = res.data.projectFacadeImgLis.map(item => {
return {
filePath: 'data:image/png;base64,'+ item.filePath
}
})
} catch (e) {
this.propertyData.propertyBanner.ztBanner = []
this.propertyData.propertyBanner.lmBanner = []
}
// 遍历户型信息 利用map弄出符合前台的数据结构
let propertyProjectInfoArr = []
res.data.bnsProductList.forEach(propertySinle => {
const singleData = {}
singleData.unitArea = propertySinle.bnsProduct.unitArea
singleData.bayNumber = propertySinle.bnsProduct.bayNumber
singleData.roomNumber = propertySinle.bnsProduct.roomNumber
singleData.hallNumber = propertySinle.bnsProduct.hallNumber
singleData.toiletNumber = propertySinle.bnsProduct.toiletNumber
singleData.southWidth = propertySinle.bnsProduct.southWidth
singleData.liveRoomWidth = propertySinle.bnsProduct.liveRoomWidth
singleData.masterRoomWidth = propertySinle.bnsProduct.masterRoomWidth
singleData.guestRoomWidth = propertySinle.bnsProduct.guestRoomWidth
singleData.filePath = propertySinle.productImgList[0].filePath
propertySinle.familyFunc.forEach(item => {
if(item.list) {
item.list.forEach(item2 => {
if(item2.checkboxGroup && item2.checkboxGroup.length > 0) {
const value = item2.checkboxGroup[0]
singleData[item.parentName + '-' + item2.functionName] = this.propertyFunctionMap[value]
} else {
singleData[item.parentName + '-' + item2.functionName] = this.propertyFunctionMap['null']
}
})
}
})
propertyProjectInfoArr.push(singleData)
})
this.propertyData.propertyBanner.hxBanner = propertyProjectInfoArr
this.hxObjectData = this.propertyData.propertyBanner.hxBanner[0] || {}
this.propertyLoading = false
} else {
this.propertyLoading = false
}
}).catch(e => {
this.$message({
type: 'error',
message: e.msg
})
this.propertyLoading = false
})
},
getPropertySupplyData () {
queryPropertySupplyData(this.propertyId).then(res => {
const areaRange = []
const supplyNum = []
const dealNum = []
const rate = []
this.supplySaleData.rows = res.data
this.supplyDemandRatioData.rows = res.data
res.data.forEach(item => {
areaRange.push(item.areaRange)
supplyNum.push(item.suplyNumber)
dealNum.push(item.dealNumber)
rate.push(item.rate)
})
this.supplySaleDataDetail.areaRange.data = areaRange
this.supplySaleDataDetail.supplyNum.data = supplyNum
this.supplySaleDataDetail.dealNum.data = dealNum
this.supplyDemandRatioDataDetail.areaRange.data = areaRange
this.supplyDemandRatioDataDetail.rate.data = rate
})
} }
}, },
computed: { computed: {
...@@ -450,8 +457,18 @@ ...@@ -450,8 +457,18 @@
return table return table
} }
}, },
mounted() { beforeMount() {
this.hxObjectData = this.propertyData.propertyBanner.hxBanner[0] this.propertyId = this.$route.query.propertyId
this.getPropertyDetail()
this.getPropertySupplyData()
},
created() {
window.eventBus.$on('searchParamChange', (searchResult) => {
this.$router.push({
path: '/regionalPlate',
query: searchResult
})
})
} }
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment