Commit c620334b authored by xingyuji's avatar xingyuji

Merge branch 'develop' into 'master'

fix: 导出表格时 0、1换为是和否

fix: 楼盘详情-产品类型分组展示
fix: 楼盘详情 产品面宽数据柱状图修改
fix: 楼盘详情 下载技术资料没有时置灰

See merge request !41
parents 0a92f5b6 766f42b7
......@@ -2,15 +2,15 @@
<div v-if="!item.hidden" class="menu-wrapper">
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<app-link :to="resolvePath(onlyOneChild.path)" v-if="onlyOneChild.path !== '/tenioStore'">
<app-link :to="resolvePath(onlyOneChild.path)" v-if="onlyOneChild.meta.outerNet !== true">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<item :meta="Object.assign({},item.meta,onlyOneChild.meta)" />
</el-menu-item>
</app-link>
<a v-else @click="toTenioStore">
<el-menu-item>
<a class="tenioStore" v-else @click="toTenioStore">
<li>
<item :meta="Object.assign({},item.meta,onlyOneChild.meta)" />
</el-menu-item>
</li>
</a>
</template>
......@@ -125,6 +125,35 @@ export default {
background-color: #EC7F5F!important
}
}
.tenioStore {
display: inline-block;
overflow: hidden;
width 90%;
margin 0 auto;
border-radius 10px
text-decoration none
li {
background-color transparent
padding 0 20px!important
height 44px
cursor pointer
box-sizing border-box
span {
margin-left 10px
font-size 14px
}
i {
margin-right: 5px;
width: 24px;
text-align: center;
font-size: 18px;
vertical-align: middle;
}
}
li:hover {
background-color: #EC7F5F!important
}
}
.svg-icon {
margin-right: 12px;
}
......
......@@ -82,13 +82,14 @@ let routes = [
path: '/tenioStore',
hidden: false,
name: 'tenioStore',
meta: { title: '天友户型库', icon: 'el-icon-s-platform', outerNet: true },
component: Layout,
children: [
{
path: '/tenioStore',
path: 'index',
name: 'tenioStore',
hidden: false,
meta: { title: '天友户型库', icon: 'el-icon-s-platform' },
meta: { title: '天友户型库', icon: 'el-icon-s-platform', outerNet: true },
component: () => import('@/views/tenioStore/index.vue'),
}
]
......
......@@ -174,7 +174,7 @@
import { getRegionPlate } from "../../assets/js/api/plateSupplyManage";
import { unitArea } from "./unitArea";
import {plateAnalysis, queryProductionType, exportExcelJson, exportAsExcel, plateAnalysisHouseImg} from "@assets/js/api/projectManage";
import { propertyMapFunction } from "../propertiesDetail/propertyFunctionMap";
import { propertyMapFunction, tableDataType } from "../propertiesDetail/propertyFunctionMap";
import {downloadFile} from "../../assets/js/public";
export default {
name: "ProductAnalysis",
......@@ -420,9 +420,24 @@
})
}
this.productionProjectData = resultArray
this.unitDetailJsonExport = JSON.stringify(resultArray)
console.log(resultArray, 'ddddddddddddddddddddddddd')
console.log(this.unitDetailJsonExport, 'eeeeeeeeeeeeeeeeeeeeeeeeeeee')
let dealArr = JSON.stringify(JSON.parse(resultArray)).map((item => {
if(item.productionProperties && item.productionProperties.length > 0) {
item.productionProperties.map(item2 => {
Object.keys(tableDataType).forEach(key => {
if(tableDataType[key] === 'string') {
item2[key] = item2[key] ? item2[key] : '无'
}
else if(tableDataType[key] === 'boolean') {
item2[key] = item2[key] == 1 ? '是' : '否'
} else if(tableDataType[key] === 'img') {
item2[key] = item2[key] ? item2[key] : null
}
})
})
return item
}
}))
this.unitDetailJsonExport = JSON.stringify(dealArr)
})
exportExcelJson(temp).then(res => {
try {
......
......@@ -10,7 +10,9 @@
{{propertyData.projectInformation.name}}
</div>
<div class="bannerOptions">
<el-button class="downloadPropertyData" :disabled="propertyData.fileList.length === 0" @click="downloadDataFlag = true" type="" >下载技术资料</el-button>
<el-button type="danger"
:title="propertyData.fileList.length === 0 ? '未查询到技术资料' : ''"
:disabled="propertyData.fileList.length === 0" @click="downloadDataFlag = true" >下载技术资料</el-button>
<el-radio-group v-model="bannerType" @change="scorllTop">
<el-radio-button :label="0">总图</el-radio-button>
<el-radio-button :label="1">立面</el-radio-button>
......@@ -56,17 +58,21 @@
:table-data="hxObjectData"></multi-header-table>
</div>
</div>
<!-- banner户型图一览-->
<div class="unitList" v-if="bannerType === 2 && !unitDetailShowFlag">
<el-row>
<el-col :span="8" v-for="(item,index) in propertyData.propertyBanner.hxBanner" :key="index">
<unit-card
style="cursor:pointer;"
@cardClick="toUnitDetail(item.businessId)"
:unit-name="item.projectTypeName || '产品类型'"
:unit-area="item.unitArea"
:img-list="item.imgList"
:unit-info="item.roomNumber + '-' + item.hallNumber + '-' + item.toiletNumber"></unit-card>
</el-col>
<el-row v-for="(value, key) in propertyData.productionGroupThrough" :key="key" class="unit-group-container">
<div class="unit-group-title">{{key}}</div>
<div class="unit-group-content">
<el-col :span="8" v-for="(unit,index) in value" :key="index">
<unit-card
style="cursor:pointer;"
@cardClick="toUnitDetail(unit.businessId)"
:unit-name="unit.projectTypeName || '产品类型'"
:unit-area="unit.unitArea"
:img-list="unit.imgList"
:unit-info="unit.roomNumber + '-' + unit.hallNumber + '-' + unit.toiletNumber"></unit-card>
</el-col>
</div>
</el-row>
</div>
</div>
......@@ -207,7 +213,12 @@
</el-col>
<el-col :span="12">
<!-- 各房 面宽图表数据-->
<ve-histogram v-if="houseWidthCharts.rows.length > 0" :legend="{ bottom: 0 }" :data="houseWidthCharts" :extend="extend" :colors="colorArr"></ve-histogram>
<ve-histogram
v-if="houseWidthCharts.rows.length > 0"
:legend="{ bottom: 0 }"
:settings="houseWidthChartsSettings"
:data="houseWidthCharts" :extend="extend"
:colors="colorArr"></ve-histogram>
<div v-else style="height: 400px;display: flex;align-items: center">
<div style="width: 50%;text-align: center;margin: auto">
<svg-icon icon-class="noData" style="width: 250px;height: 250px" />
......@@ -342,9 +353,21 @@
houseUnitTable: [],
// 房屋面宽信息图表
houseWidthCharts: {
columns: ['roomInfo'],
columns: ['production', 'nxmk', 'qjsmk', 'zwmk', 'kwmk'],
rows: []
},
// 房屋面宽信息图表设置
houseWidthChartsSettings: {
stack: { '南向面宽': ['nxmk'], '其他面宽': ['qjsmk', 'zwmk', 'kwmk'] },
labelMap: {
'production': '产品类型',
'nxmk': '南向面宽',
'qjsmk': '起居室面宽',
'zwmk': '主卧面宽',
'kwmk': '客卧面宽'
},
yAxisType: ['normal']
},
// 房屋面宽表格信息
houseWidthTable: [],
colorArr: colors,
......@@ -357,13 +380,22 @@
name: ''
},
propertyBanner: {
ztBanner: [],
lmBanner: [],
hxBanner: []
ztBanner: [
// { imgUrl}
],
lmBanner: [
// { imgUrl}
],
hxBanner: [
// { unitInfo}
]
},
propertyPlaningInfo: [],
propertySoildInfo: [],
fileList: []
fileList: [],
productionGroupThrough: {
// 产品类型1 : [户型数据]
}
},
// 户型详情
unitDetailShowFlag: false,
......@@ -378,14 +410,16 @@
barMaxWidth: 30,
barMinWidth: 12,
fontSize: 9,
label: {
show: true,
position: 'top',
formatter:function(params){ //标签内容
if(params.data == 0) { return '' }
return params.data.toFixed(1)
}
}
// label: {
// show: false,
// position: 'top',
// formatter:(params) => { // 柱状图上方总面宽信息显示
// if(params.data === 0) {
// return ''
// }
// return this.unitTotalAreaMap[params.name].toFixed(1)
// }
// }
}
},
rateExtend: {
......@@ -428,11 +462,14 @@
}
},
// 面宽图表、表格map匹配
houseWidthMap : {
'nxmk': '南向面宽',
'qjsmk': '起居室面宽',
'zwmk': '主卧面宽',
'kwmk': '客卧面宽'
// houseWidthMap : {
// 'nxmk': '南向面宽',
// 'qjsmk': '起居室面宽',
// 'zwmk': '主卧面宽',
// 'kwmk': '客卧面宽'
// },
unitTotalAreaMap: {
},
// 导出数据储存
exportSupplyDataSave: [],
......@@ -630,10 +667,19 @@
})
propertyProjectInfoArr.push(singleData)
})
console.log(propertyProjectInfoArr)
this.propertyData.propertyBanner.hxBanner = propertyProjectInfoArr
this.hxObjectData = this.propertyData.propertyBanner.hxBanner[0] || {}
this.propertyLoading = false
// 户型一览数据处理
propertyProjectInfoArr.forEach(item => {
if(!this.propertyData.productionGroupThrough[item.projectTypeName]) {
this.propertyData.productionGroupThrough[item.projectTypeName] = []
this.propertyData.productionGroupThrough[item.projectTypeName].push(item)
} else {
this.propertyData.productionGroupThrough[item.projectTypeName].push(item)
}
})
console.log(this.propertyData.productionGroupThrough, '产品呢类型分组')
} else {
this.propertyLoading = false
}
......@@ -734,27 +780,40 @@
this.houseUnitTable = res.data.pieDetilTableList
this.houseWidthTable = res.data.barDetilDtoList
// 面宽信息柱状图
let histomData = []
let colum = ['roomInfo']
if(res.data.barDetilDtoList && res.data.barDetilDtoList.length > 0) {
Object.keys(this.houseWidthMap).forEach(key => {
// 单条数据预备对象
let singleData = {}
res.data.barDetilDtoList.forEach(item => {
// 将产品名称加入到图表条件
if(colum.length - 1 !== res.data.barDetilDtoList.length) {
colum.push(item.production)
}
if(!singleData.roomInfo) {
singleData.roomInfo = this.houseWidthMap[key]
}
singleData[item.production] = item[key]
})
histomData.push(singleData)
try {
const chartsBarUnitData = JSON.parse(JSON.stringify(res.data.barDetilDtoList))
this.houseWidthCharts.rows = chartsBarUnitData.map(item => {
item.nxmk = item.nxmk || 0
item.qjsmk = item.qjsmk || 0
item.zwmk = item.zwmk || 0
item.kwmk = item.kwmk || 0
this.unitTotalAreaMap[item.production] = item.nxmk + item.qjsmk + item.zwmk + item.kwmk
return item
})
} catch (e) {
this.houseWidthCharts.rows = []
}
this.houseWidthCharts.columns = colum
this.houseWidthCharts.rows = histomData
// let histomData = []
// let colum = ['roomInfo']
// if(res.data.barDetilDtoList && res.data.barDetilDtoList.length > 0) {
// Object.keys(this.houseWidthMap).forEach(key => {
// // 单条数据预备对象
// let singleData = {}
// res.data.barDetilDtoList.forEach(item => {
// // 将产品名称加入到图表条件
// if(colum.length - 1 !== res.data.barDetilDtoList.length) {
// colum.push(item.production)
// }
// if(!singleData.roomInfo) {
// singleData.roomInfo = this.houseWidthMap[key]
// }
// singleData[item.production] = item[key]
// })
// histomData.push(singleData)
// })
// }
// this.houseWidthCharts.columns = colum
// this.houseWidthCharts.rows = histomData
}).catch(e => {
this.$message({
type: 'error',
......@@ -853,12 +912,19 @@
}
.bannerOptions {
float right
.downloadPropertyData{
.el-button--danger{
margin-right 15px
background-color #F08967
border-color #F08967
color white
}
.el-button--danger.is-disabled {
color: #C0C4CC!important;
cursor: not-allowed!important;
background-image: none!important;
background-color: #FFF!important;
border-color: #EBEEF5!important;
}
}
}
}
......@@ -891,6 +957,28 @@
.el-col{
margin-bottom 20px
}
.unit-group-container{
margin 0 50px
border 1px solid #409eff
border-radius 8px
.unit-group-title {
width 100%
box-sizing border-box
color #333333
padding 10px 20px
border-radius-topleft 8px
border-radius-topright 8px
font-size 24px
font-weight 600
}
.unit-group-content {
margin-top 5px
}
}
.unit-group-container:nth-child(2n) {
margin-top 10px
margin-bottom 10px
}
}
}
.unitInformation{
......
......@@ -15,3 +15,41 @@ export const propertyMapFunction = {
other: '其他',
null: ''
}
export const tableDataType = {
'unitArea': 'string',
'imgUrl': 'img',
'bayNumber': 'string',
'roomNumber': 'string',
'hallNumber': 'string',
'toiletNumber': 'string',
'southWidth': 'string',
'liveRoomWidth': 'string',
'masterRoomWidth': 'string',
'guestRoomWidth': 'string',
'liveRoom-largeHorizontalHall': 'boolean', // 起居室-大横厅
'liveRoom-balcony': 'boolean', // 起居室-外设阳台
'liveRoom-LDK': 'boolean', // 起居室-LDK
'masterRoom-masterBathRoom': 'boolean', // 主卧-主卫
'masterRoom-cloakRoom': 'boolean', // 主卧-衣帽间
'guestRoom-guestBathRoom': 'boolean', // 客卧-客卫
'kitchen-LDK': 'boolean', // 厨房-LDK
'kitchen-SCWesternCook': 'boolean', // 厨房-中西厨分离
'kitchen-hallwayCFDX': 'boolean', // 厨房-玄关设厨房独立动线
'kitchen-kitchenStyle': 'string', // 厨房-厨房形式
'restaurant-LDK': 'boolean', // 餐厅-LDK
'restaurant-independentWindow': 'boolean', // 餐厅-独立开窗
'bookRoom-wideHallSingleGuard': 'string', // 书房-大宽厅/独立
'restRoom-brightBathRoom': 'boolean', // 卫生间-明卫
'restRoom-dryWetDepart': 'boolean', // 卫生间-干湿分离
'restRoom-function': 'string', // 卫生间-功能
'bathRoom-brightBathRoom': 'boolean', // 主卫
'bathRoom-dryWetDepart': 'boolean',
'bathRoom-function': 'string',
'balcony-designHalcony': 'boolean', // 阳台
'balcony-location': 'string',
'storeRoom-designStoreRoom': 'boolean', //储藏间
'houseSpace-designHouseSpace': 'boolean', // 家政间
'hallway-designHallway': 'boolean', // 玄关
'hallway-designHallwayCFDX': 'boolean'
}
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