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 + }) + } } })