From e80b69e5887b0d6f78b1cf3280e0707311838188 Mon Sep 17 00:00:00 2001 From: fuguobin Date: Fri, 23 Feb 2024 10:32:24 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 52 +++++++-------- src/permission.ts | 12 ++-- src/views/dashboard/components/BarChart.vue | 2 +- src/views/dashboard/components/LineChart.vue | 22 ++++++- src/views/dashboard/components/PieChart.vue | 63 +++++++++++-------- src/views/data-visual/components/hxPress.vue | 7 +++ src/views/data-visual/components/hxTemp.vue | 7 +++ src/views/data-visual/components/priPress.vue | 7 +++ src/views/data-visual/components/priTemp.vue | 7 +++ src/views/data-visual/components/secPress.vue | 7 +++ src/views/data-visual/components/secTemp.vue | 7 +++ src/views/data-visual/index.scss | 6 +- src/views/data-visual/index.vue | 4 +- src/views/monitoring/components/header.vue | 8 ++- .../monitoring/screen/components/main.vue | 6 +- src/views/monitoring/screen/index.vue | 16 ++--- 16 files changed, 153 insertions(+), 80 deletions(-) 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 @@