Commit cd1aa449 authored by wangjiankun's avatar wangjiankun

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

fix: 路由全局监听报错 部分错误字段修改 柱状图宽度自适应修改
parent 2a695e76
...@@ -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{
......
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
:num="item.projectSize" :num="item.projectSize"
:fontSize="14" :fontSize="14"
:text-color="'#ffffff'" :text-color="'#ffffff'"
:bg-color="'rgba(25,124,230,0.6)'" :bg-color="item.adminRegion === regionClickId ? '#2980b9' : 'rgba(25,124,230,0.6)'"
:active-color="'rgba(25,124,230,1)'" :active-color="'rgba(25,124,230,1)'"
:bg-img-url="null" :active-action="item.adminRegion === regionClickId"
:circle="'50%'" :circle="'50%'"
:width="80" :width="80"
:height="80" :height="80"
...@@ -59,8 +59,8 @@ ...@@ -59,8 +59,8 @@
:text="item.name" :text="item.name"
:fontSize="12" :fontSize="12"
:text-color="'#ffffff'" :text-color="'#ffffff'"
:bg-color="item.saleStatus == 1 ? 'rgb(25,124,230,0.6)' : 'rgb(169,209,142,0.6)'" :bg-color="item.saleStatus == 1 ? 'rgb(25,124,230,0.7)' : 'rgb(46,204,113, 0.8)'"
:active-color="item.saleStatus == 1 ? 'rgb(25,124,230,1)' : 'rgb(169,209,142,1)'" :active-color="item.saleStatus == 1 ? 'rgb(25,124,230,1)' : 'rgb(46,204,113, 1)'"
:bg-img-url="null" :bg-img-url="null"
:circle="'10px'" :circle="'10px'"
:height="30"></my-overlay> :height="30"></my-overlay>
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
</div> </div>
<div class="infomationContainer"> <div class="infomationContainer">
<div class="propertyListName" style="color: #1482f0" @click="toPropertyDetail(item.businessId)">{{item.name}}</div> <div class="propertyListName" style="color: #1482f0" @click="toPropertyDetail(item.businessId)">{{item.name}}</div>
<p>价格:{{item.price || '--'}}/m<sup>2</sup></p> <p>价格:{{item.price || '--'}} <span>元/m<sup>2</sup></span></p>
<p>产品类型: {{item.productType || '--'}}</p> <p>产品类型: {{item.productType || '--'}}</p>
<p>占地面积:{{item.landArea || '--'}}m<sup>2</sup></p> <p>占地面积:{{item.landArea || '--'}}m<sup>2</sup></p>
<p>建筑面积:{{item.totalArea || '--'}}m<sup>2</sup></p> <p>建筑面积:{{item.totalArea || '--'}}m<sup>2</sup></p>
...@@ -206,8 +206,8 @@ ...@@ -206,8 +206,8 @@
import { plateRegionDetail } from "./plateCharacteristics"; import { plateRegionDetail } from "./plateCharacteristics";
import MyOverlay from '@comp/mapOverlay' import MyOverlay from '@comp/mapOverlay'
import propertyControll from '@comp/propertyControll' import propertyControll from '@comp/propertyControll'
import { queryAllRegions, queryPlateByRegionId, queryPlateDetailById } from "../../assets/js/api/unitManage"; import { queryAllRegions, queryPlateDetailById, queryAllPLate } from "../../assets/js/api/unitManage";
import { averagePosition} from "../../assets/js/public"; import { averagePosition, distinct5} from "../../assets/js/public";
export default { export default {
name: 'RegionalPlate', name: 'RegionalPlate',
components: { components: {
...@@ -274,7 +274,8 @@ ...@@ -274,7 +274,8 @@
defaultSetting: '' defaultSetting: ''
} }
}, // key/value 对应 }, // key/value 对应
BMapTool: null BMapTool: null,
regionClickId: ''
} }
}, },
methods: { methods: {
...@@ -328,34 +329,36 @@ ...@@ -328,34 +329,36 @@
this.detailShow = true this.detailShow = true
}, },
setShowToPlate (item) { setShowToPlate (item) {
queryPlateByRegionId(item.businessId).then(res => { queryAllPLate().then(res => {
if(!res.data || res.data.length === 0) { const plate = res.data.data
this.$message({ this.regionClickId = item.businessId
type: 'warning', if(plate && plate.length > 0) {
message: '该行政区下未查询到板块' this.showType = 'plate'
}) this.map.center.lng = item.longitude
return this.map.center.lat = item.latitude
} this.map.setZoom = this.zoomType['plate']
for(let i =0, l = res.data.length; i < l; i++) { this.dataType['plate'] = plate
this.transform(res.data[i].longitude, res.data[i].latitude).then(point => {
res.data[i].longitude = point.lng
res.data[i].latitude = point.lat
if(i === l - 1) {
this.showType = 'plate'
this.map.center.lng = res.data[0] ? res.data[0].longitude :item.longitude
this.map.center.lat = res.data[0] ? res.data[0].latitude :item.latitude
this.map.setZoom = this.zoomType['plate']
this.dataType['plate'] = res.data
}
})
} }
}).catch(e => {
this.$message({
type: 'error',
message: e.msg
})
return e
}) })
// queryPlateByRegionId(item.businessId).then(res => {
// if(!res.data || res.data.length === 0) {
// this.$message({
// type: 'warning',
// message: '该行政区下未查询到板块'
// })
// return
// }
// this.regionClickId = item.businessId
// for(let i =0, l = res.data.length; i < l; i++) {
//
// }
// }).catch(e => {
// this.$message({
// type: 'error',
// message: e.msg
// })
// return e
// })
}, },
setShowToPlateRegion (item) { setShowToPlateRegion (item) {
queryPlateDetailById(item.businessId).then(res => { queryPlateDetailById(item.businessId).then(res => {
...@@ -367,6 +370,9 @@ ...@@ -367,6 +370,9 @@
}) })
return return
} }
// 产品类型
let productTypeName = ''
// 基本信息
let info = JSON.parse(JSON.stringify(res.data)) let info = JSON.parse(JSON.stringify(res.data))
this.dataType.plateRegion.resultBnsProjectDTOSDetail = info.resultBnsProjectDTOS this.dataType.plateRegion.resultBnsProjectDTOSDetail = info.resultBnsProjectDTOS
this.dataType.plateRegion.resultBnsLandDTOSDetail = info.resultBnsLandDTOS this.dataType.plateRegion.resultBnsLandDTOSDetail = info.resultBnsLandDTOS
...@@ -388,10 +394,18 @@ ...@@ -388,10 +394,18 @@
this.dataType.plateRegion.resultBnsProjectDTOS = res.data.resultBnsProjectDTOS this.dataType.plateRegion.resultBnsProjectDTOS = res.data.resultBnsProjectDTOS
} }
}) })
if(res.data.resultBnsProjectDTOS[i].productType) {
productTypeName = productTypeName + res.data.resultBnsProjectDTOS[i].productType + (i === l -1 ? '' : ',')
}
} }
} else { } else {
this.dataType.plateRegion.resultBnsProjectDTOS = [] this.dataType.plateRegion.resultBnsProjectDTOS = []
} }
if(productTypeName) {
productTypeName = productTypeName.split(',')
productTypeName = distinct5(productTypeName)
}
this.dataType.plateRegion.plateInfo.productionTypeName = productTypeName ? productTypeName.join('+') : ''
if(res.data.resultBnsLandDTOS &&res.data.resultBnsLandDTOS.length > 0) { if(res.data.resultBnsLandDTOS &&res.data.resultBnsLandDTOS.length > 0) {
for(let i = 0, l = res.data.resultBnsLandDTOS.length; i < l ; i++) { for(let i = 0, l = res.data.resultBnsLandDTOS.length; i < l ; i++) {
this.transform(res.data.resultBnsLandDTOS[i].longitude || 0, res.data.resultBnsLandDTOS[i].latitude || 0).then(point => { this.transform(res.data.resultBnsLandDTOS[i].longitude || 0, res.data.resultBnsLandDTOS[i].latitude || 0).then(point => {
...@@ -406,6 +420,7 @@ ...@@ -406,6 +420,7 @@
this.dataType.plateRegion.resultBnsLandDTOS = [] this.dataType.plateRegion.resultBnsLandDTOS = []
} }
}).catch(e => { }).catch(e => {
console.log(e)
this.$message({ this.$message({
type: 'error', type: 'error',
message: e.msg message: e.msg
...@@ -433,6 +448,7 @@ ...@@ -433,6 +448,7 @@
if(this.$route.query && this.$route.query.type && this.$route.query.data) { if(this.$route.query && this.$route.query.type && this.$route.query.data) {
const searchResult = this.$route.query const searchResult = this.$route.query
if(searchResult.type === 'plateRegion') { if(searchResult.type === 'plateRegion') {
let productionTypeName = ''
let resultData = JSON.parse(searchResult.data) // 解码data let resultData = JSON.parse(searchResult.data) // 解码data
let info = JSON.parse(JSON.stringify(resultData)) let info = JSON.parse(JSON.stringify(resultData))
this.dataType.plateRegion.resultBnsProjectDTOSDetail = info.resultBnsProjectDTOS this.dataType.plateRegion.resultBnsProjectDTOSDetail = info.resultBnsProjectDTOS
...@@ -452,10 +468,19 @@ ...@@ -452,10 +468,19 @@
this.dataType.plateRegion.resultBnsProjectDTOS = resultData.resultBnsProjectDTOS this.dataType.plateRegion.resultBnsProjectDTOS = resultData.resultBnsProjectDTOS
} }
}) })
// 产品类型拼接
if(resultData.resultBnsProjectDTOS[i].productType) {
productionTypeName = productionTypeName + resultData.resultBnsProjectDTOS[i].productType + (i === l -1 ? '' : ',')
}
} }
} else { } else {
this.dataType.plateRegion.resultBnsProjectDTOS = [] this.dataType.plateRegion.resultBnsProjectDTOS = []
} }
if(productionTypeName) {
productionTypeName = productionTypeName.split(',')
productionTypeName = distinct5(productionTypeName)
}
this.dataType.plateRegion.plateInfo.productionTypeName = productionTypeName ? productionTypeName.join('+') : ''
// 转换坐标 赋值土拍 // 转换坐标 赋值土拍
if(resultData.resultBnsLandDTOS && resultData.resultBnsLandDTOS.length > 0) { if(resultData.resultBnsLandDTOS && resultData.resultBnsLandDTOS.length > 0) {
resultData.resultBnsLandDTOS = resultData.resultBnsLandDTOS.filter(item => { return item.longitude && item.latitude }) resultData.resultBnsLandDTOS = resultData.resultBnsLandDTOS.filter(item => { return item.longitude && item.latitude })
...@@ -502,6 +527,7 @@ ...@@ -502,6 +527,7 @@
} }
window.eventBus.$on('searchParamChange', (searchResult) => { window.eventBus.$on('searchParamChange', (searchResult) => {
if(searchResult.type === 'plateRegion') { if(searchResult.type === 'plateRegion') {
let productionTypeName = '' // 产品类型
let resultData = JSON.parse(searchResult.data) // 解码data let resultData = JSON.parse(searchResult.data) // 解码data
let info = JSON.parse(JSON.stringify(resultData)) let info = JSON.parse(JSON.stringify(resultData))
this.dataType.plateRegion.resultBnsProjectDTOSDetail = info.resultBnsProjectDTOS this.dataType.plateRegion.resultBnsProjectDTOSDetail = info.resultBnsProjectDTOS
...@@ -513,28 +539,37 @@ ...@@ -513,28 +539,37 @@
// 渲染楼盘点 // 渲染楼盘点
if(resultData.resultBnsProjectDTOS && resultData.resultBnsProjectDTOS.length > 0) { if(resultData.resultBnsProjectDTOS && resultData.resultBnsProjectDTOS.length > 0) {
resultData.resultBnsProjectDTOS = resultData.resultBnsProjectDTOS.filter(item => { return item.longitude && item.latitude }) resultData.resultBnsProjectDTOS = resultData.resultBnsProjectDTOS.filter(item => { return item.longitude && item.latitude })
for(let i = 0, l = resultData.resultBnsProjectDTOS.length; i < l ; i++) { for(let i = 0, l = resultData.resultBnsProjectDTOS.length; i < l ; i++) {
this.transform(resultData.resultBnsProjectDTOS[i].longitude || 0, resultData.resultBnsProjectDTOS[i].latitude || 0).then(point => { this.transform(resultData.resultBnsProjectDTOS[i].longitude || 0, resultData.resultBnsProjectDTOS[i].latitude || 0).then(point => {
resultData.resultBnsProjectDTOS[i].longitude = point.lng resultData.resultBnsProjectDTOS[i].longitude = point.lng
resultData.resultBnsProjectDTOS[i].latitude = point.lat resultData.resultBnsProjectDTOS[i].latitude = point.lat
if(i === l - 1) { if(i === l - 1) {
this.dataType.plateRegion.resultBnsProjectDTOS = resultData.resultBnsProjectDTOS this.dataType.plateRegion.resultBnsProjectDTOS = resultData.resultBnsProjectDTOS
}
})
if(resultData.resultBnsProjectDTOS[i].productType) {
productionTypeName = productionTypeName + resultData.resultBnsProjectDTOS[i].productType + (i === l -1 ? '' : ',')
} }
}) }
} }
if(productionTypeName) {
productionTypeName = productionTypeName.split(',')
productionTypeName = distinct5(productionTypeName)
} }
this.dataType.plateRegion.plateInfo.productionTypeName = productionTypeName ? productionTypeName.join('+') : ''
// 渲染土拍坐标点 // 渲染土拍坐标点
if(resultData.resultBnsLandDTOS && resultData.resultBnsLandDTOS.length > 0) { if(resultData.resultBnsLandDTOS && resultData.resultBnsLandDTOS.length > 0) {
resultData.resultBnsLandDTOS = resultData.resultBnsLandDTOS.filter(item => { return item.longitude && item.latitude }) resultData.resultBnsLandDTOS = resultData.resultBnsLandDTOS.filter(item => { return item.longitude && item.latitude })
for(let i = 0, l = resultData.resultBnsLandDTOS.length; i < l ; i++) { for(let i = 0, l = resultData.resultBnsLandDTOS.length; i < l ; i++) {
this.transform(resultData.resultBnsLandDTOS[i].longitude, resultData.resultBnsLandDTOS[i].latitude).then(point => { this.transform(resultData.resultBnsLandDTOS[i].longitude, resultData.resultBnsLandDTOS[i].latitude).then(point => {
resultData.resultBnsLandDTOS[i].longitude = point.lng resultData.resultBnsLandDTOS[i].longitude = point.lng
resultData.resultBnsLandDTOS[i].latitude = point.lat resultData.resultBnsLandDTOS[i].latitude = point.lat
if(i === l - 1) { if(i === l - 1) {
this.dataType.plateRegion.resultBnsLandDTOS = resultData.resultBnsLandDTOS this.dataType.plateRegion.resultBnsLandDTOS = resultData.resultBnsLandDTOS
} }
}) })
} }
} }
this.showType = 'plateRegion' this.showType = 'plateRegion'
this.map.center.lng = resultData.longitude this.map.center.lng = resultData.longitude
...@@ -575,6 +610,19 @@ ...@@ -575,6 +610,19 @@
}) })
}) })
}, },
transformArray(arr) {
return new Promise((resolve, reject) => {
if(arr.length > 100) {
reject('转换上限为100个!')
}
// type = 3 高德地图、腾讯地图 转 百度地图
new this.BMapTool.Convertor().translate(arr.map(item => { return { lng: item.longitude, lat: item.latitude } }), 3, 5, (data) => {
if(data.status === 0) {
resolve(data.points)
}
})
})
},
queryAllRegion() { queryAllRegion() {
// 若无传递值 则查询全部区域及其下属数目信息 // 若无传递值 则查询全部区域及其下属数目信息
queryAllRegions().then(res => { queryAllRegions().then(res => {
...@@ -600,8 +648,6 @@ ...@@ -600,8 +648,6 @@
}) })
} }
}) })
//
// this.dataType.region = arr
}).catch(e => { }).catch(e => {
this.$message({ this.$message({
type: 'error', type: 'error',
......
...@@ -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