|
|
@ -62,13 +62,22 @@ |
|
|
|
<section class="statistics"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-card> |
|
|
|
<template #header> 一网温度 </template> |
|
|
|
<LineChart id="lineChart" height="300px" width="100%" /> |
|
|
|
</el-card> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-card> |
|
|
|
<template #header> 一网进温排行 </template> |
|
|
|
<BarChart id="barChart" height="300px" width="100%" /> |
|
|
|
</el-card> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<PieChart id="pieChart" height="300px" width="100%" /> |
|
|
|
<el-card> |
|
|
|
<template #header> 一网回温排行 </template> |
|
|
|
<BarChart id="barCharts" height="300px" width="100%" /> |
|
|
|
</el-card> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</section> |
|
|
@ -98,7 +107,7 @@ const isCurrentRoute = ref(true); |
|
|
|
const userStore = useUserStore(); |
|
|
|
const duration = 5000; |
|
|
|
const userNumber = ref(2800); |
|
|
|
const notice = ref({}); |
|
|
|
// const notice = ref({}); |
|
|
|
// const vsitsNumber = transitionNum(720, 5000); |
|
|
|
const currentTime = useDateFormat(useNow(), 'YYYY-MM-DD HH:mm:ss'); |
|
|
|
const hoursNow = useNow().value.getHours(); |
|
|
@ -122,7 +131,7 @@ interface CardData { |
|
|
|
const cardData: CardData[] = [ |
|
|
|
{ |
|
|
|
id: '1', |
|
|
|
title: '供热面积', |
|
|
|
title: '正在报警数量/报警总数量', |
|
|
|
value: 50000, |
|
|
|
time: 5000, |
|
|
|
colors: ['#ec4786', '#b955a4'], |
|
|
@ -131,7 +140,7 @@ const cardData: CardData[] = [ |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: '2', |
|
|
|
title: '产热量', |
|
|
|
title: '产热数量', |
|
|
|
value: 200, |
|
|
|
time: 5000, |
|
|
|
colors: ['#865ec0', '#5144b4'], |
|
|
@ -177,32 +186,32 @@ const timePeriod = computed(() => { |
|
|
|
onMounted(() => { |
|
|
|
getWeatherData(); |
|
|
|
// socket.initialize(wsUrl); |
|
|
|
const webVersion = sessionStorage.getItem('webVersion'); |
|
|
|
if (webVersion != '' && webVersion != null) { |
|
|
|
const version = JSON.parse(webVersion); |
|
|
|
notice.value = ElNotification({ |
|
|
|
title: version.noticeTitle, |
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
customClass: 'notice', |
|
|
|
duration: 0, |
|
|
|
message: version.noticeContent.replace(/\n/g, '<br>'), |
|
|
|
onClose: () => { |
|
|
|
noticeCloce(version.noticeId); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
function noticeCloce(id: any) { |
|
|
|
//更新日志关闭事件 |
|
|
|
const params = { |
|
|
|
versionId: id |
|
|
|
}; |
|
|
|
userVersionRelation(params).then((res: any) => { |
|
|
|
if (res.code === 200) { |
|
|
|
console.log('更新日志关闭!'); |
|
|
|
} |
|
|
|
// const webVersion = sessionStorage.getItem('webVersion'); |
|
|
|
// if (webVersion != '' && webVersion != null) { |
|
|
|
// const version = JSON.parse(webVersion); |
|
|
|
// notice.value = ElNotification({ |
|
|
|
// title: version.noticeTitle, |
|
|
|
// dangerouslyUseHTMLString: true, |
|
|
|
// customClass: 'notice', |
|
|
|
// duration: 0, |
|
|
|
// message: version.noticeContent.replace(/\n/g, '<br>'), |
|
|
|
// onClose: () => { |
|
|
|
// noticeCloce(version.noticeId); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// } |
|
|
|
}); |
|
|
|
} |
|
|
|
// function noticeCloce(id: any) { |
|
|
|
// //更新日志关闭事件 |
|
|
|
// const params = { |
|
|
|
// versionId: id |
|
|
|
// }; |
|
|
|
// userVersionRelation(params).then((res: any) => { |
|
|
|
// if (res.code === 200) { |
|
|
|
// console.log('更新日志关闭!'); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// } |
|
|
|
function getWeatherData() { |
|
|
|
//获取天气 |
|
|
|
getWeather().then((res: any) => { |
|
|
|