diff --git a/src/assets/logo/海南.png b/src/assets/logo/海南.png new file mode 100644 index 00000000..28a9bd6f Binary files /dev/null and b/src/assets/logo/海南.png differ diff --git a/src/assets/logo/灿能.png b/src/assets/logo/灿能.png new file mode 100644 index 00000000..070f50c9 Binary files /dev/null and b/src/assets/logo/灿能.png differ diff --git a/src/assets/logo/电网.png b/src/assets/logo/电网.png new file mode 100644 index 00000000..d3b338ec Binary files /dev/null and b/src/assets/logo/电网.png differ diff --git a/src/assets/logo/电网1.png b/src/assets/logo/电网1.png new file mode 100644 index 00000000..029a1f39 Binary files /dev/null and b/src/assets/logo/电网1.png differ diff --git a/src/stores/config.ts b/src/stores/config.ts index 9e9e03d0..b07ef500 100644 --- a/src/stores/config.ts +++ b/src/stores/config.ts @@ -1,246 +1,246 @@ -import { reactive } from 'vue' -import { defineStore } from 'pinia' -import { STORE_CONFIG } from '@/stores/constant/cacheKey' -import type { Layout } from '@/stores/interface' - -export const useConfig = defineStore( - 'config', - () => { - const layout: Layout = reactive({ - /* 全局 */ - showDrawer: false, - // 是否收缩布局(小屏终端) - shrink: false, - // 后台布局方式,可选值 - layoutMode: 'Classic', - // 后台主页面切换动画,可选值 - mainAnimation: 'slide-right', - // 是否暗黑模式 - isDark: false, - elementUiPrimary: ['#002B6A', '#002B6A'], - tableHeaderBackground: ['#F3F6F9', '#F3F6F9'], - tableHeaderColor: ['#111', '#fff'], - tableCurrent: ['#F3F6F9', '#F3F6F9'], - /* 侧边菜单 */ - // 侧边菜单背景色 - menuBackground: ['#002B6A', '#1d1e1f'], - // 侧边菜单文字颜色 - menuColor: ['#FFFFFF', '#CFD3DC'], - // 侧边菜单激活项背景色 - menuActiveBackground: ['#002255', '#1d1e1f'], - // 侧边菜单激活项文字色 - menuActiveColor: ['#409eff', '#3375b9'], - // 侧边菜单顶栏背景色 - menuTopBarBackground: ['#002B6A', '#1d1e1f'], - // 侧边菜单宽度(展开时),单位px - menuWidth: 260, - // 侧边菜单项默认图标 - menuDefaultIcon: 'fa fa-circle-o', - // 是否水平折叠收起菜单 - menuCollapse: false, - // 是否只保持一个子菜单的展开(手风琴) - menuUniqueOpened: false, - // 显示菜单栏顶栏(LOGO) - menuShowTopBar: true, - - /* 顶栏 */ - // 顶栏文字色 - headerBarTabColor: ['#FFFFFF', '#CFD3DC'], - // // 顶栏激活项背景色 - headerBarTabActiveBackground: ['#ffffff', '#1d1e1f'], - // 顶栏激活项文字色 - headerBarTabActiveColor: ['#000000', '#409EFF'], - // 顶栏背景色 - headerBarBackground: ['#002B6A', '#1d1e1f'], - // 顶栏悬停时背景色 - headerBarHoverBackground: ['#f5f5f5', '#18222c'] - }) - - const lang = reactive({ - // 默认语言,可选值 - defaultLang: 'zh-cn', - // 当在默认语言包找不到翻译时,继续在 fallbackLang 语言包内查找翻译 - fallbackLang: 'zh-cn', - // 支持的语言列表 - langArray: [ - { name: 'zh-cn', value: '中文简体' }, - { name: 'en', value: 'English' } - ] - }) - - function menuWidth() { - if (layout.shrink) { - return layout.menuCollapse ? '0px' : layout.menuWidth + 'px' - } - // 菜单是否折叠 - return layout.menuCollapse ? '64px' : layout.menuWidth + 'px' - } - - function setLang(val: string) { - lang.defaultLang = val - } - - function onSetLayoutColor(data = layout.layoutMode) { - // 切换布局时,如果是为默认配色方案,对菜单激活背景色重新赋值 - const tempValue = layout.isDark - ? { idx: 1, color: '#1d1e1f', newColor: '#141414' } - : { idx: 0, color: '#ffffff', newColor: '#f5f5f5' } - if ( - data == 'Classic' && - layout.headerBarBackground[tempValue.idx] == tempValue.color && - layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.color - ) { - layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.newColor - } else if ( - data == 'Default' && - layout.headerBarBackground[tempValue.idx] == tempValue.color && - layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.newColor - ) { - layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.color - } - } - - function setLayoutMode(data: string) { - layout.layoutMode = data - onSetLayoutColor(data) - } - - const setLayout = (name: keyof Layout, value: any) => { - layout[name] = value as never - } - - const getColorVal = function (name: keyof Layout): string { - const colors = layout[name] as string[] - if (layout.isDark) { - return colors[1] - } else { - return colors[0] - } - } - - return { layout, lang, menuWidth, setLang, setLayoutMode, setLayout, getColorVal, onSetLayoutColor } - }, - // () => { - // - // console.log('🚀 ~ subject:', subject) - // const layout: Layout = reactive({ - // /* 全局 */ - // showDrawer: false, - // // 是否收缩布局(小屏终端) - // shrink: false, - // // 后台布局方式,可选值 - // layoutMode: 'Classic', - // // 后台主页面切换动画,可选值 - // mainAnimation: subject.mainAnimation, - // // 是否暗黑模式 - // isDark: false, - // elementUiPrimary: JSON.parse(subject.elementUiPrimary), - // tableHeaderBackground: JSON.parse(subject.tableHeaderBackground), - // tableHeaderColor:JSON.parse(subject.tableHeaderColor), - // tableCurrent: JSON.parse(subject.tableCurrent), - // /* 侧边菜单 */ - // // 侧边菜单背景色 - // menuBackground: JSON.parse(subject.menuBackground), - // // 侧边菜单文字颜色 - // menuColor:JSON.parse(subject.menuColor), - // // 侧边菜单激活项背景色 - // menuActiveBackground:JSON.parse(subject.menuActiveBackground), - // // 侧边菜单激活项文字色 - // menuActiveColor:JSON.parse(subject.menuActiveColor), - // // 侧边菜单顶栏背景色 - // menuTopBarBackground: JSON.parse(subject.menuTopBarBackground), - // // 侧边菜单宽度(展开时),单位px - // menuWidth: 260, - // // 侧边菜单项默认图标 - // menuDefaultIcon: 'fa fa-circle-o', - // // 是否水平折叠收起菜单 - // menuCollapse: false, - // // 是否只保持一个子菜单的展开(手风琴) - // menuUniqueOpened: false, - // // 显示菜单栏顶栏(LOGO) - // menuShowTopBar: true, - - // /* 顶栏 */ - // // 顶栏文字色 - // headerBarTabColor:JSON.parse(subject.headerBarTabColor), - // // // 顶栏激活项背景色 - // headerBarTabActiveBackground: ['#ffffff', '#1d1e1f'], - // // 顶栏激活项文字色 - // headerBarTabActiveColor: ['#000000', '#409EFF'], - // // 顶栏背景色 - // headerBarBackground: JSON.parse(subject.headerBarBackground), - // // 顶栏悬停时背景色 - // headerBarHoverBackground: ['#f5f5f5', '#18222c'] - // }) - // // console.log(123, window.localStorage.getItem('getTheme')) - - // const lang = reactive({ - // // 默认语言,可选值 - // defaultLang: 'zh-cn', - // // 当在默认语言包找不到翻译时,继续在 fallbackLang 语言包内查找翻译 - // fallbackLang: 'zh-cn', - // // 支持的语言列表 - // langArray: [ - // { name: 'zh-cn', value: '中文简体' }, - // { name: 'en', value: 'English' } - // ] - // }) - - // function menuWidth() { - // if (layout.shrink) { - // return layout.menuCollapse ? '0px' : layout.menuWidth + 'px' - // } - // // 菜单是否折叠 - // return layout.menuCollapse ? '64px' : layout.menuWidth + 'px' - // } - - // function setLang(val: string) { - // lang.defaultLang = val - // } - - // function onSetLayoutColor(data = layout.layoutMode) { - // // 切换布局时,如果是为默认配色方案,对菜单激活背景色重新赋值 - // const tempValue = layout.isDark - // ? { idx: 1, color: '#1d1e1f', newColor: '#141414' } - // : { idx: 0, color: '#ffffff', newColor: '#f5f5f5' } - // if ( - // data == 'Classic' && - // layout.headerBarBackground[tempValue.idx] == tempValue.color && - // layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.color - // ) { - // layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.newColor - // } else if ( - // data == 'Default' && - // layout.headerBarBackground[tempValue.idx] == tempValue.color && - // layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.newColor - // ) { - // layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.color - // } - // } - - // function setLayoutMode(data: string) { - // layout.layoutMode = data - // onSetLayoutColor(data) - // } - - // const setLayout = (name: keyof Layout, value: any) => { - // layout[name] = value as never - // } - - // const getColorVal = function (name: keyof Layout): string { - // const colors = layout[name] as string[] - // if (layout.isDark) { - // return colors[1] - // } else { - // return colors[0] - // } - // } - - // return { layout, lang, menuWidth, setLang, setLayoutMode, setLayout, getColorVal, onSetLayoutColor } - // }, - { - persist: { - key: STORE_CONFIG - } - } -) +import { reactive } from 'vue' +import { defineStore } from 'pinia' +import { STORE_CONFIG } from '@/stores/constant/cacheKey' +import type { Layout } from '@/stores/interface' + +export const useConfig = defineStore( + 'config', + () => { + const layout: Layout = reactive({ + /* 全局 */ + showDrawer: false, + // 是否收缩布局(小屏终端) + shrink: false, + // 后台布局方式,可选值 + layoutMode: 'Classic', + // 后台主页面切换动画,可选值 + mainAnimation: 'slide-right', + // 是否暗黑模式 + isDark: false, + elementUiPrimary: ['#002B6A', '#002B6A'], + tableHeaderBackground: ['#F3F6F9', '#F3F6F9'], + tableHeaderColor: ['#111', '#fff'], + tableCurrent: ['#F3F6F9', '#F3F6F9'], + /* 侧边菜单 */ + // 侧边菜单背景色 + menuBackground: ['#002B6A', '#1d1e1f'], + // 侧边菜单文字颜色 + menuColor: ['#FFFFFF', '#CFD3DC'], + // 侧边菜单激活项背景色 + menuActiveBackground: ['#002255', '#1d1e1f'], + // 侧边菜单激活项文字色 + menuActiveColor: ['#409eff', '#3375b9'], + // 侧边菜单顶栏背景色 + menuTopBarBackground: ['#002B6A', '#1d1e1f'], + // 侧边菜单宽度(展开时),单位px + menuWidth: 260, + // 侧边菜单项默认图标 + menuDefaultIcon: 'fa fa-circle-o', + // 是否水平折叠收起菜单 + menuCollapse: false, + // 是否只保持一个子菜单的展开(手风琴) + menuUniqueOpened: false, + // 显示菜单栏顶栏(LOGO) + menuShowTopBar: true, + + /* 顶栏 */ + // 顶栏文字色 + headerBarTabColor: ['#FFFFFF', '#CFD3DC'], + // // 顶栏激活项背景色 + headerBarTabActiveBackground: ['#ffffff', '#1d1e1f'], + // 顶栏激活项文字色 + headerBarTabActiveColor: ['#000000', '#409EFF'], + // 顶栏背景色 + headerBarBackground: ['#002B6A', '#1d1e1f'], + // 顶栏悬停时背景色 + headerBarHoverBackground: ['#f5f5f5', '#18222c'] + }) + + const lang = reactive({ + // 默认语言,可选值 + defaultLang: 'zh-cn', + // 当在默认语言包找不到翻译时,继续在 fallbackLang 语言包内查找翻译 + fallbackLang: 'zh-cn', + // 支持的语言列表 + langArray: [ + { name: 'zh-cn', value: '中文简体' }, + { name: 'en', value: 'English' } + ] + }) + + function menuWidth() { + if (layout.shrink) { + return layout.menuCollapse ? '0px' : layout.menuWidth + 'px' + } + // 菜单是否折叠 + return layout.menuCollapse ? '64px' : layout.menuWidth + 'px' + } + + function setLang(val: string) { + lang.defaultLang = val + } + + function onSetLayoutColor(data = layout.layoutMode) { + // 切换布局时,如果是为默认配色方案,对菜单激活背景色重新赋值 + const tempValue = layout.isDark + ? { idx: 1, color: '#1d1e1f', newColor: '#141414' } + : { idx: 0, color: '#ffffff', newColor: '#f5f5f5' } + if ( + data == 'Classic' && + layout.headerBarBackground[tempValue.idx] == tempValue.color && + layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.color + ) { + layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.newColor + } else if ( + data == 'Default' && + layout.headerBarBackground[tempValue.idx] == tempValue.color && + layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.newColor + ) { + layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.color + } + } + + function setLayoutMode(data: string) { + layout.layoutMode = data + onSetLayoutColor(data) + } + + const setLayout = (name: keyof Layout, value: any) => { + layout[name] = value as never + } + + const getColorVal = function (name: keyof Layout): string { + const colors = layout[name] as string[] || ['#082E6C', '#0e8780'] + if (layout.isDark) { + return colors[1] + } else { + return colors[0] + } + } + + return { layout, lang, menuWidth, setLang, setLayoutMode, setLayout, getColorVal, onSetLayoutColor } + }, + // () => { + // + // console.log('🚀 ~ subject:', subject) + // const layout: Layout = reactive({ + // /* 全局 */ + // showDrawer: false, + // // 是否收缩布局(小屏终端) + // shrink: false, + // // 后台布局方式,可选值 + // layoutMode: 'Classic', + // // 后台主页面切换动画,可选值 + // mainAnimation: subject.mainAnimation, + // // 是否暗黑模式 + // isDark: false, + // elementUiPrimary: JSON.parse(subject.elementUiPrimary), + // tableHeaderBackground: JSON.parse(subject.tableHeaderBackground), + // tableHeaderColor:JSON.parse(subject.tableHeaderColor), + // tableCurrent: JSON.parse(subject.tableCurrent), + // /* 侧边菜单 */ + // // 侧边菜单背景色 + // menuBackground: JSON.parse(subject.menuBackground), + // // 侧边菜单文字颜色 + // menuColor:JSON.parse(subject.menuColor), + // // 侧边菜单激活项背景色 + // menuActiveBackground:JSON.parse(subject.menuActiveBackground), + // // 侧边菜单激活项文字色 + // menuActiveColor:JSON.parse(subject.menuActiveColor), + // // 侧边菜单顶栏背景色 + // menuTopBarBackground: JSON.parse(subject.menuTopBarBackground), + // // 侧边菜单宽度(展开时),单位px + // menuWidth: 260, + // // 侧边菜单项默认图标 + // menuDefaultIcon: 'fa fa-circle-o', + // // 是否水平折叠收起菜单 + // menuCollapse: false, + // // 是否只保持一个子菜单的展开(手风琴) + // menuUniqueOpened: false, + // // 显示菜单栏顶栏(LOGO) + // menuShowTopBar: true, + + // /* 顶栏 */ + // // 顶栏文字色 + // headerBarTabColor:JSON.parse(subject.headerBarTabColor), + // // // 顶栏激活项背景色 + // headerBarTabActiveBackground: ['#ffffff', '#1d1e1f'], + // // 顶栏激活项文字色 + // headerBarTabActiveColor: ['#000000', '#409EFF'], + // // 顶栏背景色 + // headerBarBackground: JSON.parse(subject.headerBarBackground), + // // 顶栏悬停时背景色 + // headerBarHoverBackground: ['#f5f5f5', '#18222c'] + // }) + // // console.log(123, window.localStorage.getItem('getTheme')) + + // const lang = reactive({ + // // 默认语言,可选值 + // defaultLang: 'zh-cn', + // // 当在默认语言包找不到翻译时,继续在 fallbackLang 语言包内查找翻译 + // fallbackLang: 'zh-cn', + // // 支持的语言列表 + // langArray: [ + // { name: 'zh-cn', value: '中文简体' }, + // { name: 'en', value: 'English' } + // ] + // }) + + // function menuWidth() { + // if (layout.shrink) { + // return layout.menuCollapse ? '0px' : layout.menuWidth + 'px' + // } + // // 菜单是否折叠 + // return layout.menuCollapse ? '64px' : layout.menuWidth + 'px' + // } + + // function setLang(val: string) { + // lang.defaultLang = val + // } + + // function onSetLayoutColor(data = layout.layoutMode) { + // // 切换布局时,如果是为默认配色方案,对菜单激活背景色重新赋值 + // const tempValue = layout.isDark + // ? { idx: 1, color: '#1d1e1f', newColor: '#141414' } + // : { idx: 0, color: '#ffffff', newColor: '#f5f5f5' } + // if ( + // data == 'Classic' && + // layout.headerBarBackground[tempValue.idx] == tempValue.color && + // layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.color + // ) { + // layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.newColor + // } else if ( + // data == 'Default' && + // layout.headerBarBackground[tempValue.idx] == tempValue.color && + // layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.newColor + // ) { + // layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.color + // } + // } + + // function setLayoutMode(data: string) { + // layout.layoutMode = data + // onSetLayoutColor(data) + // } + + // const setLayout = (name: keyof Layout, value: any) => { + // layout[name] = value as never + // } + + // const getColorVal = function (name: keyof Layout): string { + // const colors = layout[name] as string[] + // if (layout.isDark) { + // return colors[1] + // } else { + // return colors[0] + // } + // } + + // return { layout, lang, menuWidth, setLang, setLayoutMode, setLayout, getColorVal, onSetLayoutColor } + // }, + { + persist: { + key: STORE_CONFIG + } + } +) diff --git a/src/utils/mqtt.ts b/src/utils/mqtt.ts index a8ec54ca..582c77c8 100644 --- a/src/utils/mqtt.ts +++ b/src/utils/mqtt.ts @@ -52,11 +52,12 @@ class MQTT { } try { - const mqttUrl = - localStorage.getItem('MqttUrl') == 'null' - ? 'ws://192.168.1.68:8083/mqtt' - : localStorage.getItem('MqttUrl') - if (mqttUrl == 'null'||mqttUrl == null) return + // const mqttUrl = + // localStorage.getItem('MqttUrl') == 'null' + // ? 'ws://192.168.1.68:8083/mqtt' + // : localStorage.getItem('MqttUrl') + const mqttUrl = localStorage.getItem('MqttUrl') + if (mqttUrl == 'null' || mqttUrl == null) return this.client = mqtt.connect(mqttUrl, this.defaultOptions as IClientOptions) this.setupEventListeners() diff --git a/src/views/pqs/harmonicMonitoring/monitoringPoint/online/shishishuju/index.vue b/src/views/pqs/harmonicMonitoring/monitoringPoint/online/shishishuju/index.vue index 66352189..33708b4f 100644 --- a/src/views/pqs/harmonicMonitoring/monitoringPoint/online/shishishuju/index.vue +++ b/src/views/pqs/harmonicMonitoring/monitoringPoint/online/shishishuju/index.vue @@ -744,7 +744,8 @@ const initEcharts = (color: string, key: number, name: string) => { } //渲染echarts const init = () => { - const url = localStorage.getItem('WebSocketUrl') || 'ws://192.168.1.68:10407/api/pushMessage/' + loading.value = true + const url = localStorage.getItem('WebSocketUrl') || 'ws://192.168.1.67:10407/api/pushMessage/' echartsDataV1.value = initEcharts('#DAA520', 0, 'A相') echartsDataV2.value = initEcharts('#2E8B57', 0, 'B相') echartsDataV3.value = initEcharts('#A52a2a', 0, 'C相') @@ -758,6 +759,7 @@ const init = () => { return } if (monitoringPoint.state.comFlag == 0) { + loading.value = false return ElMessage({ message: '所选监测点离线!', type: 'warning' @@ -826,7 +828,7 @@ const init = () => { ] spectrumRef.value?.init(data) trendRef.value?.init(data) - + loading.value = false // console.log('🚀 ~ dataSocket.socketServe.registerCallBack ~ webMsgSend.value:', data) setRealData() }) diff --git a/src/views/pqs/harmonicMonitoring/monitoringPoint/online/shishishuju/spectrum.vue b/src/views/pqs/harmonicMonitoring/monitoringPoint/online/shishishuju/spectrum.vue index b60fce66..7e9199d6 100644 --- a/src/views/pqs/harmonicMonitoring/monitoringPoint/online/shishishuju/spectrum.vue +++ b/src/views/pqs/harmonicMonitoring/monitoringPoint/online/shishishuju/spectrum.vue @@ -1,357 +1,358 @@ - - - + + + diff --git a/src/views/pqs/panorama/components/details/temporaryState.vue b/src/views/pqs/panorama/components/details/temporaryState.vue index a7f3ee9e..99199c04 100644 --- a/src/views/pqs/panorama/components/details/temporaryState.vue +++ b/src/views/pqs/panorama/components/details/temporaryState.vue @@ -32,7 +32,7 @@
- +
diff --git a/src/views/pqs/voltageSags/Region/components/TypeStatistics.vue b/src/views/pqs/voltageSags/Region/components/TypeStatistics.vue index 4c68b232..9c7c0a05 100644 --- a/src/views/pqs/voltageSags/Region/components/TypeStatistics.vue +++ b/src/views/pqs/voltageSags/Region/components/TypeStatistics.vue @@ -1,5 +1,5 @@