Commit cd1aa449 authored by wangjiankun's avatar wangjiankun

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

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