Commit 766f42b7 authored by wangjiankun's avatar wangjiankun

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

fix: 楼盘详情-产品类型分组展示
fix: 楼盘详情 产品面宽数据柱状图修改
fix: 楼盘详情 下载技术资料没有时置灰
parent f5728be4
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
<div v-if="!item.hidden" class="menu-wrapper"> <div v-if="!item.hidden" class="menu-wrapper">
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"> <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}"> <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<item :meta="Object.assign({},item.meta,onlyOneChild.meta)" /> <item :meta="Object.assign({},item.meta,onlyOneChild.meta)" />
</el-menu-item> </el-menu-item>
</app-link> </app-link>
<a v-else @click="toTenioStore"> <a class="tenioStore" v-else @click="toTenioStore">
<el-menu-item> <li>
<item :meta="Object.assign({},item.meta,onlyOneChild.meta)" /> <item :meta="Object.assign({},item.meta,onlyOneChild.meta)" />
</el-menu-item> </li>
</a> </a>
</template> </template>
...@@ -125,6 +125,35 @@ export default { ...@@ -125,6 +125,35 @@ export default {
background-color: #EC7F5F!important 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 { .svg-icon {
margin-right: 12px; margin-right: 12px;
} }
......
...@@ -82,13 +82,14 @@ let routes = [ ...@@ -82,13 +82,14 @@ let routes = [
path: '/tenioStore', path: '/tenioStore',
hidden: false, hidden: false,
name: 'tenioStore', name: 'tenioStore',
meta: { title: '天友户型库', icon: 'el-icon-s-platform', outerNet: true },
component: Layout, component: Layout,
children: [ children: [
{ {
path: '/tenioStore', path: 'index',
name: 'tenioStore', name: 'tenioStore',
hidden: false, hidden: false,
meta: { title: '天友户型库', icon: 'el-icon-s-platform' }, meta: { title: '天友户型库', icon: 'el-icon-s-platform', outerNet: true },
component: () => import('@/views/tenioStore/index.vue'), component: () => import('@/views/tenioStore/index.vue'),
} }
] ]
......
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
import { getRegionPlate } from "../../assets/js/api/plateSupplyManage"; import { getRegionPlate } from "../../assets/js/api/plateSupplyManage";
import { unitArea } from "./unitArea"; import { unitArea } from "./unitArea";
import {plateAnalysis, queryProductionType, exportExcelJson, exportAsExcel, plateAnalysisHouseImg} from "@assets/js/api/projectManage"; 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"; import {downloadFile} from "../../assets/js/public";
export default { export default {
name: "ProductAnalysis", name: "ProductAnalysis",
...@@ -420,9 +420,24 @@ ...@@ -420,9 +420,24 @@
}) })
} }
this.productionProjectData = resultArray this.productionProjectData = resultArray
this.unitDetailJsonExport = JSON.stringify(resultArray) let dealArr = JSON.stringify(JSON.parse(resultArray)).map((item => {
console.log(resultArray, 'ddddddddddddddddddddddddd') if(item.productionProperties && item.productionProperties.length > 0) {
console.log(this.unitDetailJsonExport, 'eeeeeeeeeeeeeeeeeeeeeeeeeeee') 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 => { exportExcelJson(temp).then(res => {
try { try {
......
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
{{propertyData.projectInformation.name}} {{propertyData.projectInformation.name}}
</div> </div>
<div class="bannerOptions"> <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-group v-model="bannerType" @change="scorllTop">
<el-radio-button :label="0">总图</el-radio-button> <el-radio-button :label="0">总图</el-radio-button>
<el-radio-button :label="1">立面</el-radio-button> <el-radio-button :label="1">立面</el-radio-button>
...@@ -56,17 +58,21 @@ ...@@ -56,17 +58,21 @@
:table-data="hxObjectData"></multi-header-table> :table-data="hxObjectData"></multi-header-table>
</div> </div>
</div> </div>
<!-- banner户型图一览-->
<div class="unitList" v-if="bannerType === 2 && !unitDetailShowFlag"> <div class="unitList" v-if="bannerType === 2 && !unitDetailShowFlag">
<el-row> <el-row v-for="(value, key) in propertyData.productionGroupThrough" :key="key" class="unit-group-container">
<el-col :span="8" v-for="(item,index) in propertyData.propertyBanner.hxBanner" :key="index"> <div class="unit-group-title">{{key}}</div>
<unit-card <div class="unit-group-content">
style="cursor:pointer;" <el-col :span="8" v-for="(unit,index) in value" :key="index">
@cardClick="toUnitDetail(item.businessId)" <unit-card
:unit-name="item.projectTypeName || '产品类型'" style="cursor:pointer;"
:unit-area="item.unitArea" @cardClick="toUnitDetail(unit.businessId)"
:img-list="item.imgList" :unit-name="unit.projectTypeName || '产品类型'"
:unit-info="item.roomNumber + '-' + item.hallNumber + '-' + item.toiletNumber"></unit-card> :unit-area="unit.unitArea"
</el-col> :img-list="unit.imgList"
:unit-info="unit.roomNumber + '-' + unit.hallNumber + '-' + unit.toiletNumber"></unit-card>
</el-col>
</div>
</el-row> </el-row>
</div> </div>
</div> </div>
...@@ -207,7 +213,12 @@ ...@@ -207,7 +213,12 @@
</el-col> </el-col>
<el-col :span="12"> <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 v-else style="height: 400px;display: flex;align-items: center">
<div style="width: 50%;text-align: center;margin: auto"> <div style="width: 50%;text-align: center;margin: auto">
<svg-icon icon-class="noData" style="width: 250px;height: 250px" /> <svg-icon icon-class="noData" style="width: 250px;height: 250px" />
...@@ -342,9 +353,21 @@ ...@@ -342,9 +353,21 @@
houseUnitTable: [], houseUnitTable: [],
// 房屋面宽信息图表 // 房屋面宽信息图表
houseWidthCharts: { houseWidthCharts: {
columns: ['roomInfo'], columns: ['production', 'nxmk', 'qjsmk', 'zwmk', 'kwmk'],
rows: [] rows: []
}, },
// 房屋面宽信息图表设置
houseWidthChartsSettings: {
stack: { '南向面宽': ['nxmk'], '其他面宽': ['qjsmk', 'zwmk', 'kwmk'] },
labelMap: {
'production': '产品类型',
'nxmk': '南向面宽',
'qjsmk': '起居室面宽',
'zwmk': '主卧面宽',
'kwmk': '客卧面宽'
},
yAxisType: ['normal']
},
// 房屋面宽表格信息 // 房屋面宽表格信息
houseWidthTable: [], houseWidthTable: [],
colorArr: colors, colorArr: colors,
...@@ -357,13 +380,22 @@ ...@@ -357,13 +380,22 @@
name: '' name: ''
}, },
propertyBanner: { propertyBanner: {
ztBanner: [], ztBanner: [
lmBanner: [], // { imgUrl}
hxBanner: [] ],
lmBanner: [
// { imgUrl}
],
hxBanner: [
// { unitInfo}
]
}, },
propertyPlaningInfo: [], propertyPlaningInfo: [],
propertySoildInfo: [], propertySoildInfo: [],
fileList: [] fileList: [],
productionGroupThrough: {
// 产品类型1 : [户型数据]
}
}, },
// 户型详情 // 户型详情
unitDetailShowFlag: false, unitDetailShowFlag: false,
...@@ -378,14 +410,16 @@ ...@@ -378,14 +410,16 @@
barMaxWidth: 30, barMaxWidth: 30,
barMinWidth: 12, barMinWidth: 12,
fontSize: 9, fontSize: 9,
label: { // label: {
show: true, // show: false,
position: 'top', // position: 'top',
formatter:function(params){ //标签内容 // formatter:(params) => { // 柱状图上方总面宽信息显示
if(params.data == 0) { return '' } // if(params.data === 0) {
return params.data.toFixed(1) // return ''
} // }
} // return this.unitTotalAreaMap[params.name].toFixed(1)
// }
// }
} }
}, },
rateExtend: { rateExtend: {
...@@ -428,11 +462,14 @@ ...@@ -428,11 +462,14 @@
} }
}, },
// 面宽图表、表格map匹配 // 面宽图表、表格map匹配
houseWidthMap : { // houseWidthMap : {
'nxmk': '南向面宽', // 'nxmk': '南向面宽',
'qjsmk': '起居室面宽', // 'qjsmk': '起居室面宽',
'zwmk': '主卧面宽', // 'zwmk': '主卧面宽',
'kwmk': '客卧面宽' // 'kwmk': '客卧面宽'
// },
unitTotalAreaMap: {
}, },
// 导出数据储存 // 导出数据储存
exportSupplyDataSave: [], exportSupplyDataSave: [],
...@@ -630,10 +667,19 @@ ...@@ -630,10 +667,19 @@
}) })
propertyProjectInfoArr.push(singleData) propertyProjectInfoArr.push(singleData)
}) })
console.log(propertyProjectInfoArr)
this.propertyData.propertyBanner.hxBanner = propertyProjectInfoArr this.propertyData.propertyBanner.hxBanner = propertyProjectInfoArr
this.hxObjectData = this.propertyData.propertyBanner.hxBanner[0] || {} this.hxObjectData = this.propertyData.propertyBanner.hxBanner[0] || {}
this.propertyLoading = false 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 { } else {
this.propertyLoading = false this.propertyLoading = false
} }
...@@ -734,27 +780,40 @@ ...@@ -734,27 +780,40 @@
this.houseUnitTable = res.data.pieDetilTableList this.houseUnitTable = res.data.pieDetilTableList
this.houseWidthTable = res.data.barDetilDtoList this.houseWidthTable = res.data.barDetilDtoList
// 面宽信息柱状图 // 面宽信息柱状图
let histomData = [] try {
let colum = ['roomInfo'] const chartsBarUnitData = JSON.parse(JSON.stringify(res.data.barDetilDtoList))
if(res.data.barDetilDtoList && res.data.barDetilDtoList.length > 0) { this.houseWidthCharts.rows = chartsBarUnitData.map(item => {
Object.keys(this.houseWidthMap).forEach(key => { item.nxmk = item.nxmk || 0
// 单条数据预备对象 item.qjsmk = item.qjsmk || 0
let singleData = {} item.zwmk = item.zwmk || 0
res.data.barDetilDtoList.forEach(item => { item.kwmk = item.kwmk || 0
// 将产品名称加入到图表条件 this.unitTotalAreaMap[item.production] = item.nxmk + item.qjsmk + item.zwmk + item.kwmk
if(colum.length - 1 !== res.data.barDetilDtoList.length) { return item
colum.push(item.production)
}
if(!singleData.roomInfo) {
singleData.roomInfo = this.houseWidthMap[key]
}
singleData[item.production] = item[key]
})
histomData.push(singleData)
}) })
} catch (e) {
this.houseWidthCharts.rows = []
} }
this.houseWidthCharts.columns = colum // let histomData = []
this.houseWidthCharts.rows = 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 => { }).catch(e => {
this.$message({ this.$message({
type: 'error', type: 'error',
...@@ -853,12 +912,19 @@ ...@@ -853,12 +912,19 @@
} }
.bannerOptions { .bannerOptions {
float right float right
.downloadPropertyData{ .el-button--danger{
margin-right 15px margin-right 15px
background-color #F08967 background-color #F08967
border-color #F08967 border-color #F08967
color white 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 @@ ...@@ -891,6 +957,28 @@
.el-col{ .el-col{
margin-bottom 20px 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{ .unitInformation{
......
...@@ -15,3 +15,41 @@ export const propertyMapFunction = { ...@@ -15,3 +15,41 @@ export const propertyMapFunction = {
other: '其他', other: '其他',
null: '' 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