|
|
@ -116,7 +116,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(); |
|
|
@ -196,32 +196,33 @@ onMounted(() => { |
|
|
|
getWeatherData(); |
|
|
|
getCardData(); |
|
|
|
// socket.initialize(wsUrl); |
|
|
|
// const webVersion = sessionStorage.getItem('webVersion'); |
|
|
|
// if (webVersion != '' && webVersion != null) { |
|
|
|
// const version = JSON.parse(webVersion); |
|
|
|
// notice.value = ElNotification({ |
|
|
|
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); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// } |
|
|
|
title: '更新日志', |
|
|
|
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 noticeCloce(id: any) { |
|
|
|
//更新日志关闭事件 |
|
|
|
const params = { |
|
|
|
versionId: id |
|
|
|
}; |
|
|
|
userVersionRelation(params).then((res: any) => { |
|
|
|
if (res.code === 200) { |
|
|
|
console.log('更新日志关闭!'); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
function getCardData() { |
|
|
|
//卡片数据 |
|
|
|
getHeatSupplyAreaApi().then((res: any) => { |
|
|
|