使用全等判断 删除不需要的log
This commit is contained in:
@ -96,7 +96,8 @@ export default {
|
||||
methods:{
|
||||
// 站点选中
|
||||
submitSite(id){
|
||||
console.log('选中的站点id',id)
|
||||
if(this.singleSiteId === id){return console.log(`点击搜索按钮 搜索相同的站点id= ${id}不再调用获取基本信息接口`)}
|
||||
console.log('点击搜索按钮 选中的站点id',id)
|
||||
this.singleSiteId = id
|
||||
getSingleSiteBaseInfo(id).then(response => {
|
||||
console.log('单个站点详情数据',response)
|
||||
@ -104,10 +105,10 @@ export default {
|
||||
this.singleSiteName = res?.siteName || ''//站点名称
|
||||
this.singleSiteLocation = res?.siteLocation || []//站点坐标
|
||||
this.singleZdSqaure.forEach(item=>{
|
||||
item.value =( res[item.attr] || res[item.attr] == 0 ) ? res[item.attr] : '-'
|
||||
item.value =( res[item.attr] || res[item.attr] === 0 ) ? res[item.attr] : '-'
|
||||
})
|
||||
this.singleZdInfo.forEach(item=>{
|
||||
item.value = ( res[item.attr] || res[item.attr] == 0 ) ? res[item.attr] : '-'
|
||||
item.value = ( res[item.attr] || res[item.attr] === 0 ) ? res[item.attr] : '-'
|
||||
})
|
||||
this.$refs.barChart.setOption(res?.sevenDayDisChargeStats || [])
|
||||
this.$refs.mapChart.setOption([{name:this.singleSiteName,value:this.singleSiteLocation}])
|
||||
|
Reference in New Issue
Block a user