|
|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
<template> |
|
|
|
|
<div class="build-electric"> |
|
|
|
|
<p class="yq-title">生产耗电分析</p> |
|
|
|
|
<div class="change-tab" style="position: absolute; top: 1rem; right: 6.25rem"> |
|
|
|
|
<!-- <div class="change-tab" style="position: absolute; top: 1rem; right: 6.25rem"> |
|
|
|
|
<div @click="selectType('1')" :style="{ |
|
|
|
|
backgroundColor: chooseType == '1' ? 'rgb(8,166,255)' : '', |
|
|
|
|
}"> |
|
|
|
|
@ -12,17 +12,29 @@ |
|
|
|
|
}"> |
|
|
|
|
功能 |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<el-checkbox |
|
|
|
|
</div> --> |
|
|
|
|
<el-select placeholder="请选择" size="mini" style="margin-left: 10px; width: 7.5rem;position: absolute; top: 1rem; right: 1.25rem;" |
|
|
|
|
v-model="choseArea" @change="searchArea" clearable> |
|
|
|
|
<el-option label="业务区" :value="1"></el-option> |
|
|
|
|
<el-option label="塔台" :value="2"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<!-- <el-checkbox |
|
|
|
|
v-if="chooseType == '1'" |
|
|
|
|
class="change-check" |
|
|
|
|
style="position: absolute; top: 1rem; right: 1.25rem; color: white" |
|
|
|
|
style="position: absolute; top: 1rem; right: 4rem; color: white" |
|
|
|
|
v-model="checkArea" |
|
|
|
|
@change="changeArea" |
|
|
|
|
>业务区</el-checkbox> |
|
|
|
|
<el-checkbox |
|
|
|
|
v-if="chooseType == '1'" |
|
|
|
|
class="change-check" |
|
|
|
|
style="position: absolute; top: 1rem; right: 1.25rem; color: white" |
|
|
|
|
v-model="checkTT" |
|
|
|
|
@change="changeTT" |
|
|
|
|
>塔台</el-checkbox> --> |
|
|
|
|
<div class="search-box"> |
|
|
|
|
<div |
|
|
|
|
v-show="checkArea" |
|
|
|
|
v-show="choseArea != ''" |
|
|
|
|
class="choose-time" |
|
|
|
|
style="float: left" |
|
|
|
|
> |
|
|
|
|
@ -102,11 +114,13 @@ export default { |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
choseArea:'', |
|
|
|
|
checkArea: false, |
|
|
|
|
checkTT:false, |
|
|
|
|
choseDate: "3", //日期选择模式 |
|
|
|
|
chooseDateValue: dateFormat(new Date(), "yyyy-MM-dd"), //日期选中值 |
|
|
|
|
chooseType: "1", |
|
|
|
|
build: ["业务区", "塔台", "气象雷达站", "西三边", "东三边", "场外二次雷达"], |
|
|
|
|
build: ["业务区", "塔台", "气象雷达站", "西三边", "东三边", "场外二次雷达","场内二次雷达"], |
|
|
|
|
buildColor: [ |
|
|
|
|
"rgb(56,169,255)", |
|
|
|
|
"rgb(44,246,172)", |
|
|
|
|
@ -118,44 +132,57 @@ export default { |
|
|
|
|
"#a3ff20", |
|
|
|
|
], |
|
|
|
|
buildValue: "", |
|
|
|
|
choseBuild: "", |
|
|
|
|
choseBuild: "模拟机", |
|
|
|
|
buildings: [ |
|
|
|
|
// "模拟机", "核心机房空调", "工艺设备" |
|
|
|
|
{ |
|
|
|
|
id: "", |
|
|
|
|
name: "全部", |
|
|
|
|
id:'模拟机', |
|
|
|
|
name:'模拟机' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: "01", |
|
|
|
|
name: "1号楼", |
|
|
|
|
id:'核心机房空调', |
|
|
|
|
name:'核心机房空调' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: "02", |
|
|
|
|
name: "2号楼", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: "03", |
|
|
|
|
name: "3号楼", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: "04", |
|
|
|
|
name: "4号楼", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: "05", |
|
|
|
|
name: "5号楼", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: "06", |
|
|
|
|
name: "6号楼", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: "08", |
|
|
|
|
name: "塔楼", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: "09", |
|
|
|
|
name: "塔台辅楼", |
|
|
|
|
}, |
|
|
|
|
id:'工艺设备', |
|
|
|
|
name:'工艺设备' |
|
|
|
|
} |
|
|
|
|
// { |
|
|
|
|
// id: "", |
|
|
|
|
// name: "全部", |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// id: "01", |
|
|
|
|
// name: "1号楼", |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// id: "02", |
|
|
|
|
// name: "2号楼", |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// id: "03", |
|
|
|
|
// name: "3号楼", |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// id: "04", |
|
|
|
|
// name: "4号楼", |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// id: "05", |
|
|
|
|
// name: "5号楼", |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// id: "06", |
|
|
|
|
// name: "6号楼", |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// id: "08", |
|
|
|
|
// name: "塔楼", |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// id: "09", |
|
|
|
|
// name: "塔台辅楼", |
|
|
|
|
// }, |
|
|
|
|
], |
|
|
|
|
choseFloor: "", //选择楼层 - 业务区,3号楼只有两层 |
|
|
|
|
floors: [ |
|
|
|
|
@ -196,14 +223,54 @@ export default { |
|
|
|
|
checkArea(newV) { |
|
|
|
|
console.log('变化了', this.chooseType) |
|
|
|
|
this.buildValue = '' |
|
|
|
|
this.choseBuild = '' |
|
|
|
|
this.choseBuild = '模拟机' |
|
|
|
|
if(newV) { |
|
|
|
|
this.build = ["1号楼", "2号楼", "3号楼", "4号楼", "5号楼", "6号楼"] |
|
|
|
|
// this.build = ["1号楼", "2号楼", "3号楼", "4号楼", "5号楼", "6号楼"] |
|
|
|
|
this.build = ["模拟机"] |
|
|
|
|
} else { |
|
|
|
|
this.build = ["业务区", "塔台", "气象雷达站", "西三边", "东三边", "场外二次雷达"] |
|
|
|
|
this.build = ["业务区", "塔台", "气象雷达站", "西三边", "东三边", "场外二次雷达","场内二次雷达"] |
|
|
|
|
} |
|
|
|
|
this.getData() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
choseArea(newVal){ |
|
|
|
|
console.log('newVal=============>',newVal) |
|
|
|
|
this.buildValue = '' |
|
|
|
|
if(newVal == 1){ |
|
|
|
|
this.buildings = [ |
|
|
|
|
{ |
|
|
|
|
id:'模拟机', |
|
|
|
|
name:'模拟机' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id:'核心机房空调', |
|
|
|
|
name:'核心机房空调' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id:'工艺设备', |
|
|
|
|
name:'工艺设备' |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
this.build = ["模拟机"] |
|
|
|
|
this.choseBuild = '模拟机' |
|
|
|
|
|
|
|
|
|
}else if(newVal == 2){ |
|
|
|
|
this.buildings = [ |
|
|
|
|
{ |
|
|
|
|
id:'机房空调', |
|
|
|
|
name:'机房空调' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id:'工艺设备', |
|
|
|
|
name:'工艺设备' |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
this.build = ["工艺设备"] |
|
|
|
|
this.choseBuild = '工艺设备' |
|
|
|
|
}else{ |
|
|
|
|
this.build = ["业务区", "塔台", "气象雷达站", "西三边", "东三边", "场外二次雷达",'场内二次雷达'] |
|
|
|
|
} |
|
|
|
|
this.getData() |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//日期类型 |
|
|
|
|
@ -244,7 +311,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
this.getData() |
|
|
|
|
}, |
|
|
|
|
// changeArea() { |
|
|
|
|
changeArea() { |
|
|
|
|
// if(this.chooseType == 1) { |
|
|
|
|
// if(this.checkArea) { |
|
|
|
|
// this.build = ["1号楼", "2号楼", "3号楼", "4号楼", "5号楼", "6号楼"] |
|
|
|
|
@ -252,10 +319,45 @@ export default { |
|
|
|
|
// this.build = ["业务区", "塔台", "气象雷达站", "西三边", "东三边", "场外二次雷达"] |
|
|
|
|
// } |
|
|
|
|
// this.getData() |
|
|
|
|
// } |
|
|
|
|
this.checkTT = false |
|
|
|
|
this.checkArea = true |
|
|
|
|
this.buildings = [ |
|
|
|
|
{ |
|
|
|
|
id:'模拟机', |
|
|
|
|
name:'模拟机' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id:'核心机房空调', |
|
|
|
|
name:'核心机房空调' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id:'工艺设备', |
|
|
|
|
name:'工艺设备' |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
this.choseBuild = '模拟机' |
|
|
|
|
this.getData() |
|
|
|
|
}, |
|
|
|
|
changeTT(){ |
|
|
|
|
this.checkTT = true |
|
|
|
|
this.checkArea = false |
|
|
|
|
this.buildings = [ |
|
|
|
|
{ |
|
|
|
|
id:'机房空调', |
|
|
|
|
name:'机房空调' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id:'工艺设备', |
|
|
|
|
name:'工艺设备' |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
this.choseBuild = '工艺设备' |
|
|
|
|
this.getData() |
|
|
|
|
}, |
|
|
|
|
// }, |
|
|
|
|
getData() { |
|
|
|
|
getProductElectricLine(this.chooseType, this.checkArea ? 1 : '', this.choseDate, this.chooseDateValue).then(res => { |
|
|
|
|
// this.chooseType, |
|
|
|
|
getProductElectricLine( this.choseArea, this.choseDate, this.chooseDateValue,this.choseBuild).then(res => { |
|
|
|
|
let leidaData = []; |
|
|
|
|
let lineData = []; |
|
|
|
|
let floorData = []; |
|
|
|
|
@ -263,11 +365,12 @@ export default { |
|
|
|
|
for (let i = 0; i < data.dataList.length; i++) { |
|
|
|
|
// leidaData.push(data.dataList[i].consume); |
|
|
|
|
lineData.push(data.dataList[i].consumeList); |
|
|
|
|
let floor = |
|
|
|
|
parseInt(data.dataList[i].locationNumber) === 0 |
|
|
|
|
? "-1" |
|
|
|
|
: parseInt(data.dataList[i].locationNumber); |
|
|
|
|
floorData.push(this.buildValue == '08' ? '塔楼' : this.buildValue == '09' ? '塔台辅楼' : floor + "F"); |
|
|
|
|
// let floor = |
|
|
|
|
// parseInt(data.dataList[i].locationNumber) === 0 |
|
|
|
|
// ? "-1" |
|
|
|
|
// : parseInt(data.dataList[i].locationNumber); |
|
|
|
|
// floorData.push(this.buildValue == '08' ? '塔楼' : this.buildValue == '09' ? '塔台辅楼' : floor + "F"); |
|
|
|
|
floorData.push(data.dataList[i].locationNumber) |
|
|
|
|
} |
|
|
|
|
if (this.buildValue == "") { |
|
|
|
|
// this.getLeida(leidaData); |
|
|
|
|
@ -326,6 +429,44 @@ export default { |
|
|
|
|
// this.floorLeida(); |
|
|
|
|
// this.floorLineChart() |
|
|
|
|
}, |
|
|
|
|
searchArea(){ |
|
|
|
|
// if(this.choseArea == 1){ |
|
|
|
|
// this.buildings = [ |
|
|
|
|
// { |
|
|
|
|
// id:'模拟机', |
|
|
|
|
// name:'模拟机' |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// id:'核心机房空调', |
|
|
|
|
// name:'核心机房空调' |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// id:'工艺设备', |
|
|
|
|
// name:'工艺设备' |
|
|
|
|
// } |
|
|
|
|
// ] |
|
|
|
|
// this.build = ["模拟机"] |
|
|
|
|
// this.choseBuild = '模拟机' |
|
|
|
|
// this.getData() |
|
|
|
|
// }else if(this.choseArea == 2){ |
|
|
|
|
// this.buildings = [ |
|
|
|
|
// { |
|
|
|
|
// id:'机房空调', |
|
|
|
|
// name:'机房空调' |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// id:'工艺设备', |
|
|
|
|
// name:'工艺设备' |
|
|
|
|
// } |
|
|
|
|
// ] |
|
|
|
|
// this.build = ["工艺设备"] |
|
|
|
|
// this.choseBuild = '工艺设备' |
|
|
|
|
// this.getData() |
|
|
|
|
// }else{ |
|
|
|
|
// this.build = ["业务区", "塔台", "气象雷达站", "西三边", "东三边", "场外二次雷达",'场内二次雷达'] |
|
|
|
|
// this.getData() |
|
|
|
|
// } |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|