项目启动,启动报错修改
This commit is contained in:
@@ -119,8 +119,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import * as echarts from 'echarts'
|
||||
// import reportHeader from './report-header.vue'
|
||||
|
||||
import { mapState, mapMutations } from 'vuex'
|
||||
import { setTitle } from '@/utils/dsbridge.js'
|
||||
import { Notify } from 'vant'
|
||||
@@ -490,7 +489,7 @@ export default {
|
||||
createChart() {
|
||||
// 柱状图配置
|
||||
// console.log(JSON.parse(res.data.energySituation));
|
||||
if (this.EnergyReportInfo?.energySituation) {
|
||||
if (this.EnergyReportInfo&&this.EnergyReportInfo.energySituation) {
|
||||
this.barOption.xAxis.data = JSON.parse(this.EnergyReportInfo.energySituation).category
|
||||
let BarData = []
|
||||
JSON.parse(this.EnergyReportInfo.energySituation).series.map((v) => {
|
||||
@@ -575,7 +574,7 @@ export default {
|
||||
|
||||
// 环形图
|
||||
// console.log(JSON.parse(res.data.coalSituation));
|
||||
if (this.EnergyReportInfo?.coalSituation) {
|
||||
if (this.EnergyReportInfo&&this.EnergyReportInfo.coalSituation) {
|
||||
this.pieOption.series[0].data = JSON.parse(
|
||||
this.EnergyReportInfo.coalSituation
|
||||
)
|
||||
@@ -583,7 +582,7 @@ export default {
|
||||
this.createPieChart()
|
||||
}
|
||||
// 扇形图
|
||||
if (this.EnergyReportInfo?.EnergyConsumeSituation) {
|
||||
if (this.EnergyReportInfo&&this.EnergyReportInfo.EnergyConsumeSituation) {
|
||||
let val = {}
|
||||
let data = []
|
||||
// 扇形图1
|
||||
|
||||
@@ -205,27 +205,27 @@ export default {
|
||||
multiCtrlModifyYear() {
|
||||
if (!this.EnergyReportInfo.multiCtrlModifyYear) return false
|
||||
if (!this.EnergyReportInfo.multiCtrlModifyYear) return false
|
||||
return JSON.parse(this.EnergyReportInfo?.multiCtrlModifyYear).length > 0
|
||||
return JSON.parse(this.EnergyReportInfo&&this.EnergyReportInfo.multiCtrlModifyYear).length > 0
|
||||
},
|
||||
heatDeviceModifyYear() {
|
||||
if (!this.EnergyReportInfo.heatDeviceModifyYear) return false
|
||||
if (!this.EnergyReportInfo.heatDeviceModifyYear) return false
|
||||
return JSON.parse(this.EnergyReportInfo?.heatDeviceModifyYear).length > 0
|
||||
return JSON.parse(this.EnergyReportInfo&&this.EnergyReportInfo.heatDeviceModifyYear).length > 0
|
||||
},
|
||||
ratioLedModifyYear() {
|
||||
if (!this.EnergyReportInfo.ratioLedModifyYear) return false
|
||||
return JSON.parse(this.EnergyReportInfo?.ratioLedModifyYear).length > 0
|
||||
return JSON.parse(this.EnergyReportInfo&&this.EnergyReportInfo.ratioLedModifyYear).length > 0
|
||||
},
|
||||
distributeMakeModifyYear() {
|
||||
if (!this.EnergyReportInfo.distributeMakeModifyYear) return false
|
||||
return (
|
||||
JSON.parse(this.EnergyReportInfo?.distributeMakeModifyYear).length > 0
|
||||
JSON.parse(this.EnergyReportInfo&&this.EnergyReportInfo.distributeMakeModifyYear).length > 0
|
||||
)
|
||||
},
|
||||
hotWaterCtrlModifyYear() {
|
||||
if (!this.EnergyReportInfo.hotWaterCtrlModifyYear) return false
|
||||
return (
|
||||
JSON.parse(this.EnergyReportInfo?.hotWaterCtrlModifyYear).length > 0
|
||||
JSON.parse(this.EnergyReportInfo&&this.EnergyReportInfo.hotWaterCtrlModifyYear).length > 0
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -859,9 +859,9 @@ export default {
|
||||
}
|
||||
this.tabName = this.$route.query.tab
|
||||
this.customerInfo = {
|
||||
customerId: infoData.item?.customerId,
|
||||
customerName: infoData.item?.consName,
|
||||
customerType: infoData.item?.customerType,
|
||||
customerId: infoData.item&&infoData.item.customerId,
|
||||
customerName: infoData.item&&infoData.item.consName,
|
||||
customerType: infoData.item&&infoData.item.customerType,
|
||||
// creditCode: '33121'
|
||||
}
|
||||
// console.log(this.customerInfo, 'oooooooooo');
|
||||
|
||||
@@ -436,7 +436,9 @@ export default {
|
||||
},
|
||||
// 右边锚点功能
|
||||
mouse(v) {
|
||||
this.$refs.anchorChild?.checkoutAnchor(v)
|
||||
if(this.$refs.anchorChild){
|
||||
this.$refs.anchorChild.checkoutAnchor(v)
|
||||
}
|
||||
},
|
||||
// 获取元素距离顶部的距离
|
||||
getHeight(dom) {
|
||||
|
||||
Reference in New Issue
Block a user