680 lines
18 KiB
Vue
680 lines
18 KiB
Vue
<template>
|
||
<div>
|
||
<!-- 头部 -->
|
||
<!-- <Header :title="title" @onClickLeft="onClickLeft" /> -->
|
||
<div class="list">
|
||
<!-- 客户详情信息 -->
|
||
<div class="list-item">
|
||
<div class="list-item-customerName">
|
||
{{ personDetail.customerName }}
|
||
</div>
|
||
<div class="list-item-div">
|
||
<img src="@/assets/customerTypeName.png" alt="" />类型:{{ typeName }}
|
||
</div>
|
||
<div class="list-item-div">
|
||
<img src="@/assets/detailAddress.png" alt="" />地址:{{
|
||
personDetail.detailAddress
|
||
}}
|
||
</div>
|
||
<div class="list-item-div">
|
||
<img src="@/assets/orgName.png" alt="" />所属区域:
|
||
{{ personDetail.orgName }}
|
||
</div>
|
||
<div class="list-item-div list-item-display" style="overflow: unset;">
|
||
<img src="@/assets/contactName.png" alt="" /> 联系人:
|
||
{{ personDetail.contactName }}
|
||
<div class="list-item-text" @click="goPrpfile">
|
||
档案信息
|
||
</div>
|
||
</div>
|
||
<div class="list-item-div">
|
||
<img src="@/assets/contactPhone.png" alt="" />联系电话:{{
|
||
personDetail.contactPhone
|
||
}}
|
||
</div>
|
||
</div>
|
||
<!--最新诊断报告 -->
|
||
<div class="new" v-if="timeType">
|
||
<img src="@/assets/nio_icon@2x.png" alt="" /> {{ timeType }}
|
||
</div>
|
||
<!-- 能源诊断报告图 -->
|
||
<div class="new-img" @click="goPartialReport" v-if="timeType">
|
||
<img src="@/assets/mid_pic@2x.png" alt="" />
|
||
</div>
|
||
<!-- 建筑信息/用能设备信息/能耗数据信息 -->
|
||
<div class="info">
|
||
<div class="info-img" @click="toDeal" style="border-bottom: 2px solid #64d1ca;flex:1;">
|
||
<img src="@/assets/architecture.png" alt="" />
|
||
<p class="gray">能源管理</p>
|
||
</div>
|
||
<div class="distance"></div>
|
||
<div class="info-img" @click="toDeal" style="border-bottom: 2px solid #ffc466;flex:1;">
|
||
<img src="@/assets/energy.png" alt="" />
|
||
<p class="gray">企业用能</p>
|
||
</div>
|
||
<div class="distance"></div>
|
||
<div class="info-img" @click="toDeal" style="border-bottom: 2px solid #10968b;flex:1;">
|
||
<img src="@/assets/consumption.png" alt="" />
|
||
<p class="gray">企业通用能源</p>
|
||
</div>
|
||
</div>
|
||
<!-- 建筑信息详情 -->
|
||
<div class="architecture">
|
||
<div class="architecture-div">
|
||
<p class="gray">年工业总产值</p>
|
||
<div class="architecture-m2">
|
||
{{ dataDetail.totalOutput }}
|
||
</div>
|
||
<div class="architecture-m2">
|
||
万元
|
||
</div>
|
||
</div>
|
||
<div class="line"></div>
|
||
<div class="architecture-div">
|
||
<p class="gray">年工业增加值</p>
|
||
<div class="architecture-m2">
|
||
{{ dataDetail.addOutput }}
|
||
</div>
|
||
<div class="architecture-m2">
|
||
万元
|
||
</div>
|
||
</div>
|
||
<div class="line"></div>
|
||
<div class="architecture-div">
|
||
<p class="gray">单位面积能耗</p>
|
||
<div class="architecture-m2">
|
||
{{ dataDetail.unitAreaEnergy }}
|
||
</div>
|
||
<div class="architecture-m2">
|
||
千克折煤/m³
|
||
</div>
|
||
</div>
|
||
<div class="line"></div>
|
||
<div class="architecture-div">
|
||
<p class="gray">人均能耗</p>
|
||
<div class="architecture-m2">
|
||
{{ dataDetail.perEnergy }}
|
||
</div>
|
||
<div class="architecture-m2">
|
||
千克折煤/人
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- 年度能耗详情 -->
|
||
<div class="energy">
|
||
<p class="energy-p">{{ dataDetail.energyYear }}年度能耗</p>
|
||
<div class="energy-p-div"></div>
|
||
<div class="energy1">
|
||
<div class="energy-div">
|
||
<p class="gray">外购电</p>
|
||
<div class="energy-m2">{{ dataDetail.payPower }}</div>
|
||
<div class="energy-m2">万kWh</div>
|
||
</div>
|
||
<div class="line"></div>
|
||
<div class="energy-div">
|
||
<p class="gray">外购低压蒸汽</p>
|
||
<div class="energy-m2">
|
||
{{ dataDetail.lowPreStreamValue }}
|
||
</div>
|
||
<div class="energy-m2">
|
||
t
|
||
</div>
|
||
</div>
|
||
<div class="line"></div>
|
||
<div class="energy-div">
|
||
<p class="gray">外购中压蒸汽</p>
|
||
<div class="energy-m2">
|
||
{{ dataDetail.medPreStreamValue }}
|
||
</div>
|
||
<div class="energy-m2">
|
||
t
|
||
</div>
|
||
</div>
|
||
<div class="line"></div>
|
||
<div class="energy-div">
|
||
<p class="gray">外购高压蒸汽</p>
|
||
<div class="energy-m2">
|
||
{{ dataDetail.highPreStreamValue }}
|
||
</div>
|
||
<div class="energy-m2">
|
||
t
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="energy-p-div"></div>
|
||
<div class="energy1">
|
||
<div class="energy-div">
|
||
<p class="gray">天然气</p>
|
||
<div class="energy-m2">{{ dataDetail.gasValue }}</div>
|
||
<div class="energy-m2">万m³</div>
|
||
</div>
|
||
<div class="line"></div>
|
||
<div class="energy-div">
|
||
<p class="gray">煤</p>
|
||
<div class="energy-m2">
|
||
{{ dataDetail.coalValue }}
|
||
</div>
|
||
<div class="energy-m2">
|
||
t
|
||
</div>
|
||
</div>
|
||
<div class="line"></div>
|
||
<div class="energy-div">
|
||
<p class="gray">汽油</p>
|
||
<div class="energy-m2">
|
||
{{ dataDetail.petrolValue }}
|
||
</div>
|
||
<div class="energy-m2">
|
||
t
|
||
</div>
|
||
</div>
|
||
<div class="line"></div>
|
||
<div class="energy-div">
|
||
<p class="gray">柴油</p>
|
||
<div class="energy-m2">
|
||
{{ dataDetail.dieselValue }}
|
||
</div>
|
||
<div class="energy-m2">
|
||
t
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- 能耗数据信息详情 -->
|
||
<div class="consumption">
|
||
<p class="consumption-p">用能系统设备统计</p>
|
||
<div class="consumption-p-div"></div>
|
||
<div class="consumption1">
|
||
<div class="consumption-div">
|
||
<div class="consumption-m2">
|
||
{{ dataDetail.distributeFlagDesc }}台
|
||
</div>
|
||
<p class="gray">配电系统</p>
|
||
</div>
|
||
<div class="line"></div>
|
||
<div class="consumption-div">
|
||
<div class="consumption-m2">{{ dataDetail.pumpFlagDesc }}台</div>
|
||
<p class="gray">泵机系统</p>
|
||
</div>
|
||
<div class="line"></div>
|
||
<div class="consumption-div">
|
||
<div class="consumption-m2">{{ dataDetail.fanFlagDesc }}台</div>
|
||
<p class="gray">风机系统</p>
|
||
</div>
|
||
<div class="line"></div>
|
||
<div class="consumption-div">
|
||
<div class="consumption-m2">{{ dataDetail.airFlagDesc }}台</div>
|
||
<p class="gray">空压机系统</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
|
||
import {
|
||
getInfoAPI,
|
||
getCurrentPersonInfoAPI
|
||
} from '@/api/customerIformation.js'
|
||
import { getCode } from '@/api/common.js'
|
||
import { getInfoByCustomerIdAPI } from '@/api/api.js'
|
||
// import Header from '@/components/headerNew'
|
||
export default {
|
||
components: {
|
||
// Header
|
||
},
|
||
data() {
|
||
return {
|
||
title: '客户能效管理',
|
||
dataDetail: {}, //客户能耗信息
|
||
personDetail: {}, //客户信息
|
||
typeList: [], //客户类型
|
||
currentPath: {
|
||
path: '',
|
||
type: 3,
|
||
name: ''
|
||
},
|
||
enterpriseId22: '', //判断是新增,还是修改
|
||
creditCode: ''
|
||
}
|
||
},
|
||
created() {
|
||
const data = {
|
||
customerId: JSON.parse(sessionStorage.getItem('tidCid')).customerId
|
||
}
|
||
sessionStorage.setItem('tidCid', JSON.stringify(data))
|
||
this.getCustomerType()
|
||
},
|
||
beforeDestroy() {
|
||
sessionStorage.removeItem('enterpriseId')
|
||
sessionStorage.removeItem('creditCode')
|
||
},
|
||
computed: {
|
||
// 类型
|
||
typeName() {
|
||
this.typeList.forEach(v => {
|
||
v.child.forEach(ev => {
|
||
if (this.personDetail.customerType === ev.code) {
|
||
this.personDetail.customerTypeName = v.name + '/' + ev.name
|
||
}
|
||
})
|
||
})
|
||
return this.personDetail.customerTypeName
|
||
},
|
||
// 最新诊断时间格式处理
|
||
timeType() {
|
||
if(this.dataDetail && this.dataDetail.alarmList instanceof Array) {
|
||
return this.dataDetail.alarmList[0]
|
||
}
|
||
return null
|
||
},
|
||
},
|
||
methods: {
|
||
// 跳转至工业企业业务处理
|
||
toDeal() {
|
||
// this.$router.push('/acquisition')
|
||
// 注释跳转 ---20240206
|
||
// if (this.enterpriseId22) {
|
||
// // localStorage.setItem('enterpriseId22', this.enterpriseId22)
|
||
// this.$router.push({
|
||
// name: 'acquisition',
|
||
// params: {
|
||
// customerId: JSON.parse(sessionStorage.getItem('tidCid')).customerId,
|
||
// enterpriseId: this.enterpriseId22
|
||
// }
|
||
// })
|
||
// } else {
|
||
// // localStorage.setItem('creditCode', this.creditCode)
|
||
// this.$router.push({
|
||
// name: 'acquisition',
|
||
// params: {
|
||
// customerId: JSON.parse(sessionStorage.getItem('tidCid')).customerId,
|
||
// creditCode: this.creditCode
|
||
// }
|
||
// })
|
||
// }
|
||
},
|
||
// //获取用能设备数据
|
||
// async getFacData() {
|
||
// let id = JSON.parse(sessionStorage.getItem('tidCid')).customerId
|
||
// const res = await getCurrentPersonInfoAPI(id)
|
||
// if (res.code == 0) {
|
||
// const data = {
|
||
// info: res.data,
|
||
// pageKey: true
|
||
// }
|
||
// // sessionStorage.setItem('facilityManage', JSON.stringify(data))
|
||
// this.$store.commit('pageData/GET_EDITDATA', data)
|
||
// return
|
||
// }
|
||
// },
|
||
// 返回
|
||
onClickLeft() {
|
||
sessionStorage.removeItem('facilityManage')
|
||
sessionStorage.removeItem('goBack')
|
||
this.$router.push('/')
|
||
},
|
||
//查询客户类型
|
||
async getCustomerType() {
|
||
const data = {
|
||
codeSortId: '80000001004',
|
||
codeType: 'khlx'
|
||
}
|
||
let tidCid = JSON.parse(sessionStorage.getItem('tidCid'))
|
||
let id = tidCid.customerId
|
||
//查询客户类型
|
||
const ref = await getCode(data)
|
||
if (ref.code === 0) {
|
||
this.typeList = ref.data
|
||
}
|
||
//获取客户信息
|
||
const req = await getCurrentPersonInfoAPI(id)
|
||
if (req.code === 0) {
|
||
this.personDetail = req.data
|
||
localStorage.setItem('taskId', req.data.taskId)
|
||
this.creditCode = req.data.creditCode
|
||
}else{
|
||
let item = JSON.parse(sessionStorage.getItem('detail')).item
|
||
this.personDetail = item
|
||
}
|
||
//获取客户能耗信息
|
||
const res = await getInfoAPI(id)
|
||
if (res.code === 0) {
|
||
this.dataDetail = res.data
|
||
}
|
||
// 查询是否有新增|修改
|
||
// if(!tidCid.item.enterpriseId) return
|
||
// const rew = await getInfoByCustomerIdAPI({ id: tidCid.item.enterpriseId })
|
||
// if (rew.code == 0) {
|
||
// console.log(rew.data.id, 'rew')
|
||
// this.enterpriseId22 = rew.data.id
|
||
// }else {
|
||
// this.enterpriseId22 = ''
|
||
// }
|
||
},
|
||
// //根据客户id查询单个建筑信息获取建筑id
|
||
// async getBuildId() {
|
||
// const id = JSON.parse(sessionStorage.getItem('tidCid')).customerId
|
||
// const res = await getInfoAPI({ customerId: id })
|
||
// if (res.code && res.data) {
|
||
// this.customerData = res.data
|
||
// sessionStorage.setItem('buildId', res.data.buildId)
|
||
// sessionStorage.setItem('equipId', res.data.equipId)
|
||
// }
|
||
// },
|
||
// //获取点击过后当前人信息
|
||
// async currentPersonInfo() {
|
||
// const id = JSON.parse(sessionStorage.getItem('tidCid')).customerId
|
||
// const res = await getCurrentPersonInfoAPI(id)
|
||
// if (res.code == 0) {
|
||
// this.personDetail = res.data
|
||
// sessionStorage.setItem('buildId', res.data.buildId)
|
||
// }
|
||
// },
|
||
// //查询单个客户统计信息
|
||
// async getCustomerStatistic() {
|
||
// const id = JSON.parse(sessionStorage.getItem('tidCid')).customerId
|
||
// const res = await getCurrentPersonInfoAPI(id)
|
||
// if (res.code == 0) {
|
||
// this.customerStatistic = res.data
|
||
// }
|
||
// },
|
||
// //获取当前页面信息
|
||
getPathInfo() {
|
||
this.currentPath.path = this.$route.path
|
||
this.currentPath.name = this.title
|
||
this.$store.commit('path/SET_PATH', this.currentPath)
|
||
sessionStorage.setItem('goPage', JSON.stringify(this.currentPath))
|
||
},
|
||
// 客户档案详情
|
||
goPrpfile() {
|
||
// this.getPathInfo()
|
||
this.getPathInfo()
|
||
|
||
this.$router.push('./archivalinformation')
|
||
// this.$router.push({
|
||
// name: 'archivalinformation'
|
||
// })
|
||
},
|
||
// 跳转到能源诊断报告
|
||
goPartialReport() {
|
||
this.$store.commit('user/GET_USER_LEVEL', 2)
|
||
this.$router.push({
|
||
name: 'partialreport',
|
||
params: { customerId: JSON.parse(sessionStorage.getItem('tidCid')).customerId }
|
||
})
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="less" scoped>
|
||
.list {
|
||
padding: 10px;
|
||
background-color: #fff;
|
||
|
||
.list-item {
|
||
width: 100%;
|
||
background: url('~@/assets/manage-btn.png') no-repeat 70%;
|
||
background-size: cover;
|
||
border-radius: 10px;
|
||
padding: 10px;
|
||
box-sizing: border-box;
|
||
|
||
.list-item-customerName {
|
||
font-weight: 700;
|
||
font-size: 19px;
|
||
padding: 8px 0px;
|
||
box-sizing: border-box;
|
||
color: #fff;
|
||
}
|
||
|
||
.list-item-div {
|
||
color: #fff;
|
||
opacity: 0.9;
|
||
margin: 5px 0;
|
||
display: flex;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
overflow: hidden;
|
||
|
||
img {
|
||
width: 20px;
|
||
height: 20px;
|
||
margin-right: 5px;
|
||
}
|
||
}
|
||
|
||
.list-item-display {
|
||
display: flex;
|
||
position: relative;
|
||
|
||
.list-item-text {
|
||
position: absolute;
|
||
top: -6px;
|
||
right: 6px;
|
||
background-color: #64d1ca;
|
||
padding: 5px;
|
||
border-radius: 5px;
|
||
box-sizing: border-box;
|
||
border: 1px solid #fff;
|
||
}
|
||
}
|
||
}
|
||
|
||
.new {
|
||
margin-top: 10px;
|
||
width: 100%;
|
||
height: 36px;
|
||
padding-left: 10px;
|
||
line-height: 36px; // border: 1px solid rgb(225, 225, 225, 0);
|
||
box-shadow: 1px 1px 10px 1px rgb(225, 225, 225, 0);
|
||
box-sizing: border-box;
|
||
border-radius: 5px;
|
||
font-weight: 700;
|
||
display: flex;
|
||
|
||
img {
|
||
width: 15px;
|
||
height: 15px;
|
||
margin: auto 10px;
|
||
}
|
||
}
|
||
|
||
.new-img {
|
||
margin-top: 10px;
|
||
text-align: center;
|
||
|
||
img {
|
||
width: 340px;
|
||
height: 70px;
|
||
}
|
||
}
|
||
|
||
.info {
|
||
margin-top: 10px;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
|
||
.info-img {
|
||
display: flex; // border: 1px solid #666666;
|
||
box-shadow: 1px 1px 10px 1px rgb(225, 225, 225, 0);
|
||
padding: 12px 5px;
|
||
border-radius: 5px;
|
||
box-sizing: border-box;
|
||
justify-content: center;
|
||
|
||
img {
|
||
width: 20px;
|
||
height: 20px;
|
||
margin-right: 5px;
|
||
}
|
||
}
|
||
}
|
||
|
||
.architecture {
|
||
display: flex;
|
||
justify-content: space-evenly; // border: 1px solid #666666;
|
||
box-shadow: 1px 1px 10px 1px rgb(225, 225, 225, 0);
|
||
box-sizing: border-box;
|
||
margin-top: 20px;
|
||
padding: 15px 5px;
|
||
border-radius: 5px;
|
||
|
||
.architecture-div {
|
||
flex: 1;
|
||
text-align: center; // border-right: 1px solid #63cbb6;
|
||
box-sizing: border-box;
|
||
|
||
.architecture-m2 {
|
||
// height: 20px;
|
||
// line-height: 20px;
|
||
margin-top: 10px;
|
||
color: #2382ff;
|
||
font-size: 12px;
|
||
|
||
.people {
|
||
font-size: 13px;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.energy {
|
||
margin-top: 20px;
|
||
padding: 5px; // border: 1px solid #666666;
|
||
box-shadow: 1px 1px 10px 1px rgb(225, 225, 225, 0);
|
||
box-sizing: border-box;
|
||
border-radius: 5px;
|
||
|
||
.energy-p {
|
||
color: #10968b;
|
||
font-weight: 700;
|
||
margin: 10px;
|
||
border-left: 4px solid #2b827c;
|
||
padding-left: 10px;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.energy-p-div {
|
||
margin-bottom: 10px;
|
||
// border-bottom: 1px dashed #e9e9e9;
|
||
width: 100%;
|
||
height: 1px;
|
||
background: linear-gradient(to right, #f5fafa, #daedec, #f5fafa);
|
||
}
|
||
|
||
.energy1 {
|
||
display: flex;
|
||
justify-content: space-evenly;
|
||
|
||
.energy-div {
|
||
padding: 5px 0 15px;
|
||
width: 25%;
|
||
text-align: center; // border-right: 1px solid #63cbb6;
|
||
box-sizing: border-box;
|
||
|
||
.energy-m2 {
|
||
color: #ffc466;
|
||
margin-top: 10px;
|
||
font-size: 12px;
|
||
|
||
.people {
|
||
font-size: 13px;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.consumption {
|
||
margin-top: 20px;
|
||
padding: 5px; // border: 1px solid #666666;
|
||
box-shadow: 1px 1px 10px 1px rgb(225, 225, 225, 0);
|
||
box-sizing: border-box;
|
||
border-radius: 5px;
|
||
|
||
.consumption-p {
|
||
color: #10968b;
|
||
font-weight: 700;
|
||
margin: 10px;
|
||
border-left: 4px solid #2b827c;
|
||
padding-left: 10px;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.consumption-p-div {
|
||
margin-bottom: 10px;
|
||
border-bottom: 1px dashed #e9e9e9;
|
||
}
|
||
|
||
.consumption1 {
|
||
display: flex;
|
||
justify-content: space-evenly;
|
||
|
||
.consumption-div {
|
||
padding: 5px 0 15px;
|
||
width: 20%;
|
||
text-align: center; // border-right: 1px solid #63cbb6;
|
||
box-sizing: border-box;
|
||
|
||
.consumption-m2 {
|
||
// height: 25px;
|
||
color: #10968b;
|
||
margin-bottom: 10px;
|
||
font-size: 12px;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.btn {
|
||
position: fixed;
|
||
bottom: 20px;
|
||
padding: 0 10px;
|
||
|
||
.faqi {
|
||
width: 355px;
|
||
background-color: #63cbb6;
|
||
color: #fff;
|
||
border-radius: 8px;
|
||
}
|
||
}
|
||
|
||
.van-cell__title,
|
||
.van-cell__value {
|
||
-webkit-box-flex: 1;
|
||
flex: 1;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
}
|
||
|
||
.van-tag--primary {
|
||
background-color: #63cbb6;
|
||
}
|
||
|
||
.gray {
|
||
color: #808080;
|
||
font-size: 12px;
|
||
display: flex;
|
||
justify-content: center;
|
||
flex-direction: column;
|
||
margin-top: 1px;
|
||
}
|
||
|
||
.line {
|
||
width: 2px;
|
||
height: 60px;
|
||
margin-top: 5px;
|
||
background: linear-gradient(to bottom, #f5fafa, #daedec, #f5fafa);
|
||
}
|
||
|
||
.distance {
|
||
width: 10px;
|
||
height: 10px;
|
||
}</style>
|
||
|