From 7752d9465d924e672fbf59f5fad7f38064ce073e Mon Sep 17 00:00:00 2001 From: aa Date: Tue, 11 Oct 2022 19:18:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B0=83=E8=89=B2=E7=9B=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/syseye/src/layouts/MainLayout.vue | 17 ++++++++++++++++- Web/syseye/src/pages/Dashboard.vue | 9 +++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Web/syseye/src/layouts/MainLayout.vue b/Web/syseye/src/layouts/MainLayout.vue index 98ed3b4..7d78e29 100644 --- a/Web/syseye/src/layouts/MainLayout.vue +++ b/Web/syseye/src/layouts/MainLayout.vue @@ -3,7 +3,18 @@ RmEye测试版v1.0.1.3 - + + + +
+ + + + +
+
+
+
@@ -34,6 +45,7 @@ import { } from 'vue' import HtmlPanel from '../components/Html.vue' // 根据实际路径导入 import axios from 'axios' +import { Cookies } from 'quasar' export default defineComponent({ components: { HtmlPanel @@ -53,6 +65,9 @@ export default defineComponent({ } }, methods: { + updateCookie (value) { + Cookies.set('color', { color: [this.color1, this.color2, this.color3, this.color4] }) + }, routerToWhiteList () { this.isInPlugin = false this.$router.push({ diff --git a/Web/syseye/src/pages/Dashboard.vue b/Web/syseye/src/pages/Dashboard.vue index 17bb1d6..e0311cb 100644 --- a/Web/syseye/src/pages/Dashboard.vue +++ b/Web/syseye/src/pages/Dashboard.vue @@ -54,6 +54,7 @@ import { defineComponent } from 'vue' import axios from 'axios' +import { Cookies } from 'quasar' import * as echarts from 'echarts' export default defineComponent({ name: 'Dashboard', @@ -190,6 +191,14 @@ export default defineComponent({ setInterval(() => { this.get_threatStatistics() }, 10000) + const colors = Cookies.get('color') + if (colors.color) { + this.Threatitems.map((item, index) => { + item.color1 = colors.color[index] + item.color2 = colors.color[index] + return item + }) + } } })