From c63a5c7e802ac8c9432869c834da5231cc49b3cd Mon Sep 17 00:00:00 2001 From: duan Date: Tue, 2 Aug 2022 16:35:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(src/views/reagent/mainoverview/):=20?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=B8=BB=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/common.js | 10 ++ src/api/reagent/overView.js | 9 ++ src/permission.js | 4 +- src/views/reagent/mainoverview/index.vue | 126 ++++++++++++++--------- 4 files changed, 100 insertions(+), 49 deletions(-) create mode 100644 src/api/common.js diff --git a/src/api/common.js b/src/api/common.js new file mode 100644 index 0000000..143784c --- /dev/null +++ b/src/api/common.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +// /api/client/client_list +export function client_list(data) { + return request({ + url: '/api/client/client_list', + method: 'post', + data + }) +} diff --git a/src/api/reagent/overView.js b/src/api/reagent/overView.js index 8185331..27d749c 100644 --- a/src/api/reagent/overView.js +++ b/src/api/reagent/overView.js @@ -25,3 +25,12 @@ export function home_drug_remaining(data) { data }) } + +// /api/home/get_monitoring_info +export function get_monitoring_info(data) { + return request({ + url: '/api/home/get_monitoring_info', + method: 'post', + data + }) +} diff --git a/src/permission.js b/src/permission.js index 4aa7d47..5240522 100644 --- a/src/permission.js +++ b/src/permission.js @@ -31,12 +31,12 @@ router.beforeEach(async(to, from, next) => { } else { try { // get user info - await store.dispatch('user/getInfo') + // await store.dispatch('user/getInfo') next() } catch (error) { // remove token and go to login page to re-login - await store.dispatch('user/resetToken') + // await store.dispatch('user/resetToken') Message.error(error || 'Has Error') next(`/login?redirect=${to.path}`) NProgress.done() diff --git a/src/views/reagent/mainoverview/index.vue b/src/views/reagent/mainoverview/index.vue index 51ba9bb..683ac05 100644 --- a/src/views/reagent/mainoverview/index.vue +++ b/src/views/reagent/mainoverview/index.vue @@ -14,26 +14,26 @@
环境监控图
- + - + - - - - + + 温度 + 湿度 + VOC含量
@@ -54,24 +54,24 @@
- 查看全部 +
- + + + + + + + + + - - -
@@ -79,7 +79,7 @@ @@ -98,10 +98,10 @@ @@ -294,8 +294,8 @@
- 取消 - 确认受邀 + 取消 + 确认受邀
@@ -304,7 +304,8 @@