Commit 0d0e7191 authored by xingyuji's avatar xingyuji

Merge branch 'develop' into 'master'

feat: 点击区域时 展示所有板块,点击的区域板块跟其他板块分开差别

fix: 路由全局监听报错 部分错误字段修改 柱状图宽度自适应修改

See merge request !25
parents 1ea97596 cd1aa449
...@@ -10,6 +10,10 @@ export function queryDetailByName(name) { ...@@ -10,6 +10,10 @@ export function queryDetailByName(name) {
name name
}) })
} }
// 查询所有板块
export function queryAllPLate() {
return xhr.get('/bnsregion/bns-region/regionByAdminRegion')
}
// 查询全部区域及楼盘数量 // 查询全部区域及楼盘数量
export function queryAllRegions() { export function queryAllRegions() {
return xhr.get('/bnsregion/bns-region/adminAndRegion') return xhr.get('/bnsregion/bns-region/adminAndRegion')
......
...@@ -66,3 +66,17 @@ export function GDmapPositionTransform(lng, lat) { ...@@ -66,3 +66,17 @@ export function GDmapPositionTransform(lng, lat) {
lat: bd_lng lat: bd_lng
}; };
} }
// 数组去重 map去重
export function distinct5(arr) {
let result = [];
let obj = {};
for (let i of arr) {
if (!obj[i]) {
result.push(i);
obj[i] = 1;
}
}
return result;
}
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
const result = new Array().concat(...property, ...region).filter(item => { const result = new Array().concat(...property, ...region).filter(item => {
return item.name.indexOf(queryString) !== -1 return item.name.indexOf(queryString) !== -1
}) })
console.log(result)
callback(result) callback(result)
}) })
}, },
......
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
pane="labelPane" pane="labelPane"
@mouseenter.native="active = true" @mouseenter.native="active = true"
@mouseleave.native="active = false" @mouseleave.native="active = false"
:class="{'flex': true}" :class="{'flex': true, 'scale': activeAction }"
:style="type === 'icon' ? { padding: '5px', minWidth: width + 'px', minHeight: height + 'px' } : :style="type === 'icon' ? { padding: '5px', minWidth: width + 'px', minHeight: height + 'px' } :
{ {
width: type === 'square' ? 'auto' : width + 'px', width: type === 'square' ? 'auto' : width + 'px',
height: height + 'px', height: height + 'px',
color: textColor, color: textColor,
backgroundColor: active ? activeColor : bgColor , backgroundColor: activeAction ? bgColor : ( active ? activeColor : bgColor) ,
borderRadius: circle, borderRadius: circle,
padding: type === 'square' ? '0 12px': '0' padding: type === 'square' ? '0 12px': '0',
}" }"
@draw="draw"> @draw="draw">
<div <div
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<script> <script>
export default { export default {
name: 'overlay', name: 'overlay',
props: ['text', 'position', 'type', 'textColor', 'bgColor', 'circle', 'width', 'height', 'num', 'fontSize', 'activeColor'], props: ['text', 'position', 'type', 'textColor', 'bgColor', 'circle', 'width', 'height', 'num', 'fontSize', 'activeColor', 'activeAction'],
data () { data () {
return { return {
active: false active: false
...@@ -86,4 +86,8 @@ ...@@ -86,4 +86,8 @@
font-size 45px font-size 45px
color red color red
} }
.scale:hover {
transition transform .5s
transform scale(1.2)
}
</style> </style>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</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> <div v-else-if="value === 'boolean' && item2[key] == undefined" >--</div>
</el-row> </el-row>
</el-col> </el-col>
</el-col> </el-col>
...@@ -238,8 +238,8 @@ ...@@ -238,8 +238,8 @@
} }
.circle { .circle {
box-sizing: border-box; box-sizing: border-box;
width: 15px; width: 12px;
height: 15px; height: 12px;
border: 1px solid #000000; border: 1px solid #000000;
border-radius: 50%; border-radius: 50%;
margin 0 auto margin 0 auto
......
...@@ -26,6 +26,7 @@ Vue.use(Viewer, { ...@@ -26,6 +26,7 @@ Vue.use(Viewer, {
} }) } })
Vue.prototype.$axios = xhr Vue.prototype.$axios = xhr
Vue.config.productionTip = false; Vue.config.productionTip = false;
// 全局事件注册
window.eventBus = new Vue() window.eventBus = new Vue()
new Vue({ new Vue({
......
...@@ -97,6 +97,11 @@ let routes = [ ...@@ -97,6 +97,11 @@ let routes = [
{ path: '*', redirect: '/404', hidden: true } { path: '*', redirect: '/404', hidden: true }
] ]
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {
routes = routes.concat(demoRoutes) routes = routes.concat(demoRoutes)
// routes = routes.concat(testRoutes) // routes = routes.concat(testRoutes)
......
...@@ -56,8 +56,8 @@ export default { ...@@ -56,8 +56,8 @@ export default {
} }
return { return {
loginForm: { loginForm: {
username: 'root', username: '',
password: '123456' password: ''
}, },
loginRules: { loginRules: {
username: [{ required: true, trigger: 'blur', validator: validateUsername }], username: [{ required: true, trigger: 'blur', validator: validateUsername }],
......
...@@ -105,10 +105,10 @@ ...@@ -105,10 +105,10 @@
</tr> </tr>
<tr v-for="item in histogramTableData"> <tr v-for="item in histogramTableData">
<td>{{item.production}}</td> <td>{{item.production}}</td>
<td>{{item.nxmkAvg.toFixed(1) || 0}}</td> <td>{{item.nxmk || '--'}}</td>
<td>{{item.qjsmkAvg.toFixed(1) || 0}}</td> <td>{{item.qjsmk || '--'}}</td>
<td>{{item.zwmkAvg.toFixed(1) || 0}}</td> <td>{{item.zwmk || '--'}}</td>
<td>{{item.kwmkAvg.toFixed(1) || 0}}</td> <td>{{item.kwmk || '--'}}</td>
</tr> </tr>
</table> </table>
</div> </div>
...@@ -190,9 +190,11 @@ ...@@ -190,9 +190,11 @@
extend: { extend: {
series: { series: {
type: 'bar', type: 'bar',
barWidth: 10, barMaxWidth: 30,
barMinWidth: 16,
label: { label: {
show: true, show: true,
fontSize: 11,
position: "top", position: "top",
formatter:function(params){ //标签内容 formatter:function(params){ //标签内容
if(params.data == 0) { return '' } if(params.data == 0) { return '' }
...@@ -558,6 +560,7 @@ ...@@ -558,6 +560,7 @@
.ProductAnalysis{ .ProductAnalysis{
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
min-width 1170px;
.header { .header {
display flex display flex
flex-direction row flex-direction row
...@@ -567,7 +570,18 @@ ...@@ -567,7 +570,18 @@
background-color: #f5f5f5; background-color: #f5f5f5;
padding-bottom 15px padding-bottom 15px
.el-input__inner { .el-input__inner {
width 200px max-width 200px
min-width 150px
}
@media screen and (min-width:1500px) and (max-width:1920px){
.el-input__inner {
width 200px
}
}
@media screen and (min-width:960px) and (max-width:1499px){
.el-input__inner {
width 150px
}
} }
.headerFlex:nth-child(2n) { .headerFlex:nth-child(2n) {
margin 0 15px margin 0 15px
...@@ -619,7 +633,7 @@ ...@@ -619,7 +633,7 @@
} }
} }
.supplyAnalysisTable{ .supplyAnalysisTable{
width: 70%; width: 92%;
margin: 40px auto 20px; margin: 40px auto 20px;
} }
.supplyDealUnitType{ .supplyDealUnitType{
......
This diff is collapsed.
...@@ -145,7 +145,8 @@ ...@@ -145,7 +145,8 @@
extend: { extend: {
series: { series: {
type: 'bar', type: 'bar',
barWidth: 30, barMaxWidth: 30,
barMinWidth: 16,
label: { label: {
show: true, show: true,
position: "top", position: "top",
...@@ -159,7 +160,8 @@ ...@@ -159,7 +160,8 @@
extend2: { extend2: {
series: { series: {
type: 'bar', type: 'bar',
barWidth: 30, barMaxWidth: 30,
barMinWidth: 16,
label: { label: {
show: true, show: true,
position: "top", position: "top",
...@@ -173,7 +175,6 @@ ...@@ -173,7 +175,6 @@
tooltipResize: { tooltipResize: {
show: true, show: true,
formatter: (params) => { formatter: (params) => {
console.log(params, 'dddddddddd')
if(params.data == 0) { return '' } if(params.data == 0) { return '' }
return `<div>${params.name}区间</br> return `<div>${params.name}区间</br>
供求比:${params.data ? (1/ params.data).toFixed(1) : ''} 供求比:${params.data ? (1/ params.data).toFixed(1) : ''}
...@@ -244,14 +245,14 @@ ...@@ -244,14 +245,14 @@
rate: res.data[key] ? (1 / res.data[key].rate || 0) : 0 rate: res.data[key] ? (1 / res.data[key].rate || 0) : 0
}) })
areaRange.push(areaRangeMap[key]) areaRange.push(areaRangeMap[key])
rate.push(res.data[key] ? (res.data[key].rate.toFixed(1) || 0) : 0) rate.push(res.data[key] ? (res.data[key].rate ? res.data[key].rate.toFixed(1) : 0 ) : 0)
supplyNumber.push(res.data[key] ? (res.data[key].suplyNumber || 0) : 0) supplyNumber.push(res.data[key] ? (res.data[key].suplyNumber || 0) : 0)
dealNumber.push(res.data[key] ? (res.data[key].dealNumber || 0) : 0) dealNumber.push(res.data[key] ? (res.data[key].dealNumber || 0) : 0)
exportList.push({ exportList.push({
areaRange: areaRangeMap[key], areaRange: areaRangeMap[key],
supplyNumber: res.data[key] ? (res.data[key].suplyNumber || 0) : 0, supplyNumber: res.data[key] ? (res.data[key].suplyNumber || 0) : 0,
dealNumber: res.data[key] ? (res.data[key].dealNumber || 0) : 0, dealNumber: res.data[key] ? (res.data[key].dealNumber || 0) : 0,
gongQiuBi: res.data[key] ? (res.data[key].rate || 0) : 0 gongQiuBi: res.data[key] ? (res.data[key].rate ? res.data[key].rate.toFixed(1) : 0 ) : 0
}) })
}) })
this.chartData.rows = supplyChartsData this.chartData.rows = supplyChartsData
......
...@@ -62,7 +62,10 @@ ...@@ -62,7 +62,10 @@
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
:label="item.label"> :label="item.label">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="white-space: nowrap;text-overflow: ellipsis;overflow: hidden">{{scope.row[item.prop] || '---'}}</div> <div
style="white-space: nowrap;text-overflow: ellipsis;overflow: hidden"
v-if="item.prop === 'dealDate'">{{scope.row[item.prop] ? scope.row[item.prop].substring(0, 10) : '---'}}</div>
<div style="white-space: nowrap;text-overflow: ellipsis;overflow: hidden" v-else >{{scope.row[item.prop] || '---'}}</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -116,7 +119,7 @@ ...@@ -116,7 +119,7 @@
<table cellspacing="0" cellpadding="0" class="table" > <table cellspacing="0" cellpadding="0" class="table" >
<tr v-for="(value, key) in supplyRateTable" :key="key"> <tr v-for="(value, key) in supplyRateTable" :key="key">
<th>{{value.name}}</th> <th>{{value.name}}</th>
<td v-for="(item,index) in value.data" :key="index">{{key === 'rate' ? (item ? item.toFixed(1) : '0') : item}}</td> <td v-for="(item,index) in value.data" :key="index">{{item}}</td>
</tr> </tr>
</table> </table>
<!-- 供求比提示信息--> <!-- 供求比提示信息-->
...@@ -155,7 +158,7 @@ ...@@ -155,7 +158,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<!-- 各房 面宽图表数据--> <!-- 各房 面宽图表数据-->
<ve-histogram :legend="{ bottom: 20 }" :data="houseWidthCharts" :extend="extend" :colors="colorArr"></ve-histogram> <ve-histogram :legend="{ bottom: 0 }" :data="houseWidthCharts" :extend="extend" :colors="colorArr"></ve-histogram>
<!-- 各房 面宽表格数据--> <!-- 各房 面宽表格数据-->
<table cellspacing="0" cellpadding="0" class="table" style="width: 90%"> <table cellspacing="0" cellpadding="0" class="table" style="width: 90%">
<tr> <tr>
...@@ -259,8 +262,7 @@ ...@@ -259,8 +262,7 @@
// 各房面积区间 供应数量图饼 // 各房面积区间 供应数量图饼
houseUnitCharts: { houseUnitCharts: {
columns: ['productionPie', 'supplication'], columns: ['productionPie', 'supplication'],
rows: [ rows: []
]
}, },
// 各房面积区间 庭室数量表格 // 各房面积区间 庭室数量表格
houseUnitTable: [], houseUnitTable: [],
...@@ -294,7 +296,9 @@ ...@@ -294,7 +296,9 @@
extend: { extend: {
series: { series: {
type: 'bar', type: 'bar',
barWidth: 10, barMaxWidth: 30,
barMinWidth: 16,
fontSize: 10,
label: { label: {
show: true, show: true,
position: 'top', position: 'top',
...@@ -308,7 +312,8 @@ ...@@ -308,7 +312,8 @@
rateExtend: { rateExtend: {
series: { series: {
type: 'bar', type: 'bar',
barWidth: 30, barMaxWidth: 30,
barMinWidth: 16,
label: { label: {
show: true, show: true,
position: "top", position: "top",
...@@ -331,7 +336,8 @@ ...@@ -331,7 +336,8 @@
supplyExtend: { supplyExtend: {
series: { series: {
type: 'bar', type: 'bar',
barWidth: 30, barMaxWidth: 30,
barMinWidth: 16,
label: { label: {
show: true, show: true,
position: "top", position: "top",
...@@ -392,6 +398,7 @@ ...@@ -392,6 +398,7 @@
if(res.data) { if(res.data) {
// 总图 // 总图
this.propertyData.projectInformation = res.data.bnsProject this.propertyData.projectInformation = res.data.bnsProject
this.propertyData.projectInformation.productTypeName = res.data.productTypeName
if(res.data.projectTotalImgList && res.data.projectTotalImgList.length > 0) { if(res.data.projectTotalImgList && res.data.projectTotalImgList.length > 0) {
this.propertyData.propertyBanner.ztBanner = res.data.projectTotalImgList this.propertyData.propertyBanner.ztBanner = res.data.projectTotalImgList
} }
...@@ -415,7 +422,7 @@ ...@@ -415,7 +422,7 @@
remarks: '' remarks: ''
} }
res.data.forEach(item => { res.data.forEach(item => {
single.code = item.code || '-----土拍' single.code = item.code || '--------'
single.soildTable = [ item ] single.soildTable = [ item ]
single.remarks = item.remarks single.remarks = item.remarks
this.propertyData.propertySoildInfo.push(single) this.propertyData.propertySoildInfo.push(single)
...@@ -461,10 +468,10 @@ ...@@ -461,10 +468,10 @@
} else { } else {
this.propertyLoading = false this.propertyLoading = false
} }
}).catch(e => { }).catch(() => {
this.$message({ this.$message({
type: 'error', type: 'error',
message: e.msg message: '查询楼盘详情数据失败'
}) })
this.propertyLoading = false this.propertyLoading = false
}) })
...@@ -495,14 +502,14 @@ ...@@ -495,14 +502,14 @@
rate: res.data[key] ? (1 / res.data[key].rate || 0) : 0 rate: res.data[key] ? (1 / res.data[key].rate || 0) : 0
}) })
areaRange.push(areaRangeMap[key]) areaRange.push(areaRangeMap[key])
rate.push(res.data[key] ? (res.data[key].rate || 0) : 0) rate.push(res.data[key] ? (res.data[key].rate ? res.data[key].rate.toFixed(1) : 0 ) : 0)
supplyNumber.push(res.data[key] ? (res.data[key].suplyNumber || 0) : 0) supplyNumber.push(res.data[key] ? (res.data[key].suplyNumber || 0) : 0)
dealNumber.push(res.data[key] ? (res.data[key].dealNumber || 0) : 0) dealNumber.push(res.data[key] ? (res.data[key].dealNumber || 0) : 0)
exportList.push({ exportList.push({
areaRange: areaRangeMap[key], areaRange: areaRangeMap[key],
supplyNumber: res.data[key] ? (res.data[key].suplyNumber || 0) : 0, supplyNumber: res.data[key] ? (res.data[key].suplyNumber || 0) : 0,
dealNumber: res.data[key] ? (res.data[key].dealNumber || 0) : 0, dealNumber: res.data[key] ? (res.data[key].dealNumber || 0) : 0,
gongQiuBi: res.data[key] ? (res.data[key].rate || 0) : 0 gongQiuBi: res.data[key] ? (res.data[key].rate ? res.data[key].rate.toFixed(1) : 0 ) : 0
}) })
}) })
this.supplySaleCharts.rows = supplyChartsData this.supplySaleCharts.rows = supplyChartsData
...@@ -519,6 +526,13 @@ ...@@ -519,6 +526,13 @@
this.supplyNoDataFlag = false this.supplyNoDataFlag = false
} }
} }
}).catch(e => {
this.$message({
type: 'error',
message: '查询供求比数据失败'
})
this.supplyNoDataFlag = true
return e
}) })
}, },
// 产品供应与户型信息 图表与表格 // 产品供应与户型信息 图表与表格
...@@ -555,11 +569,23 @@ ...@@ -555,11 +569,23 @@
} }
this.houseWidthCharts.columns = colum this.houseWidthCharts.columns = colum
this.houseWidthCharts.rows = histomData this.houseWidthCharts.rows = histomData
}).catch(e => {
this.$message({
type: 'error',
message: '查询户型信息数据失败'
})
return e
}) })
getJsonForProduction(this.propertyId).then(res => { getJsonForProduction(this.propertyId).then(res => {
if(res.data) { if(res.data) {
this.exportHouseInfoSave = JSON.parse(res.data).detilProductJsonDtoList this.exportHouseInfoSave = JSON.parse(res.data).detilProductJsonDtoList
} }
}).catch(e => {
this.$message({
type: 'error',
message: '查询户型信息导出数据失败'
})
return e
}) })
} }
}, },
...@@ -643,9 +669,8 @@ ...@@ -643,9 +669,8 @@
padding 0 20px 20px 20px padding 0 20px 20px 20px
border 2px solid rgb(222, 235, 247) border 2px solid rgb(222, 235, 247)
.container { .container {
margin-top 10px
.tagsInfo { .tagsInfo {
margin-right 25px margin 10px 25px 10px 0;
padding 5px 15px padding 5px 15px
font-size 14px font-size 14px
font-family "sans-serif" font-family "sans-serif"
...@@ -736,16 +761,19 @@ ...@@ -736,16 +761,19 @@
color #ffffff color #ffffff
text-align center text-align center
white-space nowrap white-space nowrap
padding 8px 0
} }
} }
} }
.el-table__body-wrapper{ .el-table__body-wrapper{
margin-top 3px
.el-table__body { .el-table__body {
td { td {
background-color: rgb(210, 222, 239); background-color: rgb(210, 222, 239);
color #000000 color #000000
text-align center text-align center
white-space nowrap white-space nowrap
padding 2px 0
} }
} }
} }
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
// 土拍信息表格展示 设置表头 // 土拍信息表格展示 设置表头
export const columData = [ export const columData = [
{ {
prop: 'regionName', prop: 'propertyName',
label: '区域' label: '区域'
}, },
{ {
prop: 'propertyName', prop: 'regionName',
label: '板块' label: '板块'
}, },
{ {
...@@ -21,7 +21,7 @@ export const columData = [ ...@@ -21,7 +21,7 @@ export const columData = [
prop: 'builtArea', prop: 'builtArea',
label: '建筑面积' label: '建筑面积'
},{ },{
prop: 'buildingDensity', prop: 'builtDensity',
label: '建筑密度' label: '建筑密度'
},{ },{
prop: 'floorPrice', prop: 'floorPrice',
...@@ -31,7 +31,7 @@ export const columData = [ ...@@ -31,7 +31,7 @@ export const columData = [
label: '成交日期' label: '成交日期'
},{ },{
prop: 'dealPrice', prop: 'dealPrice',
label: '成交总价(亿)' label: '成交总价()'
},{ },{
prop: 'premium', prop: 'premium',
label: '溢价' label: '溢价'
......
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