diff --git a/src/App.vue b/src/App.vue index ab9dbf7..984458e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,30 +11,30 @@ import { userVersionRelation } from '@/api/user/index'; const appStore = useAppStore(); //系统更新通知 -const notice = ref({}); -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, '
'), - onClose: () => { - noticeCloce(version.noticeId); - } - }); -} -function noticeCloce(id: any) { - //更新日志关闭事件 - const params = { - noticeId: id - }; - userVersionRelation(params).then((res: any) => { - if (res.code === 200) { - console.log('更新日志关闭!'); - } - }); -} +// const notice = ref({}); +// 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, '
'), +// onClose: () => { +// noticeCloce(version.noticeId); +// } +// }); +// } +// function noticeCloce(id: any) { +// //更新日志关闭事件 +// const params = { +// noticeId: id +// }; +// userVersionRelation(params).then((res: any) => { +// if (res.code === 200) { +// console.log('更新日志关闭!'); +// } +// }); +// } diff --git a/src/permission.ts b/src/permission.ts index 11876cf..40fc005 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -9,7 +9,7 @@ import router from '@/router'; import { useUserStoreHook } from '@/store/modules/user'; import { usePermissionStoreHook } from '@/store/modules/permission'; -import socket from '@/utils/socket'; +// import socket from '@/utils/socket'; import NProgress from 'nprogress'; import 'nprogress/nprogress.css'; NProgress.configure({ showSpinner: false }); // 进度条 @@ -35,11 +35,11 @@ router.beforeEach(async (to, from, next) => { if (to.matched.length === 0) { from.name ? next({ name: from.name }) : next('/404'); } else { - console.log('切换页面发送websocket信息'); + // console.log('切换页面发送websocket信息'); const exitStatu = { code: 'exitDataMonitor' }; - socket.onSend(exitStatu); + // socket.onSend(exitStatu); next(); } } else { @@ -50,13 +50,13 @@ router.beforeEach(async (to, from, next) => { router.addRoute(route); }); - console.log('登录后链接websocket'); + // console.log('登录后链接websocket'); //登录后连接webSocket const userStorageInfo = sessionStorage.getItem('userInfo'); const userInfo = JSON.parse(userStorageInfo === null ? '' : userStorageInfo); // const wsUrl = `ws://${window.location.host}/ws/websocket/${userInfo.userName}`; //websocket地址 - const wsUrl = `ws://10.10.10.56:9010/websocket/${userInfo.userName}`; //websocket地址 - socket.initialize(wsUrl); + // const wsUrl = `ws://10.10.10.56:9010/websocket/${userInfo.userName}`; //websocket地址 + // socket.initialize(wsUrl); next({ ...to, replace: true }); } catch (error) { // 移除 token 并跳转登录页 diff --git a/src/views/dashboard/components/BarChart.vue b/src/views/dashboard/components/BarChart.vue index c1e5a91..78e0436 100644 --- a/src/views/dashboard/components/BarChart.vue +++ b/src/views/dashboard/components/BarChart.vue @@ -1,7 +1,7 @@ diff --git a/src/views/dashboard/components/LineChart.vue b/src/views/dashboard/components/LineChart.vue index fb28346..c71da10 100644 --- a/src/views/dashboard/components/LineChart.vue +++ b/src/views/dashboard/components/LineChart.vue @@ -1,7 +1,7 @@ @@ -56,7 +56,9 @@ const options = { dataset: { source: [ ['product', '2024-01-01', '2024-01-02', '2024-01-03', '2024-01-04', '2024-01-05', '2024-01-06', '2024-01-07'], - ['日均温', 56.5, 82.1, 88.7, 70.1, 53.4, 85.1, 52] + ['进温', 59.2, 78.9, 87.8, 79.5, 52.4, 90.7, 55], + ['回温', 42.0, 60.1, 62.8, 55.9, 30.2, 79.2, 20], + ['均温', 52, 77, 75, 70.1, 53.4, 50, 40] ] }, xAxis: { @@ -97,6 +99,22 @@ const options = { } ], series: [ + { + type: 'line', + smooth: true, + seriesLayoutBy: 'row', + emphasis: { + focus: 'series' + } + }, + { + type: 'line', + smooth: true, + seriesLayoutBy: 'row', + emphasis: { + focus: 'series' + } + }, { type: 'line', smooth: true, diff --git a/src/views/dashboard/components/PieChart.vue b/src/views/dashboard/components/PieChart.vue index e385305..8d3d422 100644 --- a/src/views/dashboard/components/PieChart.vue +++ b/src/views/dashboard/components/PieChart.vue @@ -1,11 +1,12 @@