var vms = Vue.component("Company-amplify-sbqd", {
template: `
`,
props: {
businessdata:{
type:Object
}
},
data() {
return {
show:false,
//设备清单
deviceNum:0,
onlineNum:0,
warnNum:0,
offlineNum:0,
}
},
mounted(){
},
methods: {
openAmplify(){
this.show = true
this.getLastDeviceOverview()
},
closeAmplify(){
this.show = false
},
closeAmplifyAll(e){
if(e.target.className == 'amplify-fixed'){
this.show = false
}
},
//设备概况
getLastDeviceOverview(){
axios.get("/mkl/api/getLastDeviceOverview?projectId="+this.businessdata.projectIdStr, {
}).then(res => {
this.deviceNum = res.data.num,
this.onlineNum = res.data.onlineNum,
this.warnNum = res.data.offlineNum,
this.offlineNum = 0
})
},
},
watch:{
},
})