Compare commits
14 Commits
56d65a6c17
...
2026-01
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59489aaafa | ||
|
|
5d0421dd40 | ||
|
|
6d7ef7cf5d | ||
|
|
8d9ccf97a7 | ||
|
|
7188e3e681 | ||
|
|
a9fc77eb8b | ||
|
|
87af11288d | ||
|
|
0763187744 | ||
|
|
ae641604ba | ||
|
|
564e6ef4ab | ||
|
|
c84c5dae3b | ||
|
|
c902dabb73 | ||
|
|
8d1497032f | ||
|
|
6aeac753ef |
@@ -206,3 +206,11 @@ export function exportTerminalBase() {
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
//一键分配终端
|
||||
export function allotTerminal(data: any) {
|
||||
return createAxios({
|
||||
url: '/device-boot/nodeDevice/oneKeyDistribution',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
BIN
src/assets/logo/海南.png
Normal file
BIN
src/assets/logo/海南.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
BIN
src/assets/logo/灿能.png
Normal file
BIN
src/assets/logo/灿能.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/logo/电网.png
Normal file
BIN
src/assets/logo/电网.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 249 KiB |
BIN
src/assets/logo/电网1.png
Normal file
BIN
src/assets/logo/电网1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@@ -17,6 +17,7 @@ const config = useConfig()
|
||||
// import { nextTick } from 'process'
|
||||
const emit = defineEmits(['triggerPoint', 'group', 'echartClick'])
|
||||
color[0] = config.layout.elementUiPrimary[0]
|
||||
|
||||
const chartRef = ref<HTMLDivElement>()
|
||||
|
||||
const props = defineProps(['options', 'isInterVal', 'pieInterVal'])
|
||||
|
||||
@@ -79,7 +79,7 @@ const init = async () => {
|
||||
// 设置消息接收回调
|
||||
mqttClient.onMessage((topic, message) => {
|
||||
const msg = JSON.parse(message.toString())
|
||||
console.log('🚀 ~ init ~ msg:', msg)
|
||||
// console.log('🚀 ~ init ~ msg:', msg)
|
||||
if (msg.deptList.includes(adminInfo.$state.deptId)) {
|
||||
drawer.value = true
|
||||
isLoading.value = true
|
||||
|
||||
@@ -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,
|
||||
// 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
||||
layoutMode: 'Classic',
|
||||
// 后台主页面切换动画,可选值<slide-right|slide-left|el-fade-in-linear|el-fade-in|el-zoom-in-center|el-zoom-in-top|el-zoom-in-bottom>
|
||||
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({
|
||||
// 默认语言,可选值<zh-cn|en>
|
||||
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,
|
||||
// // 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
||||
// layoutMode: 'Classic',
|
||||
// // 后台主页面切换动画,可选值<slide-right|slide-left|el-fade-in-linear|el-fade-in|el-zoom-in-center|el-zoom-in-top|el-zoom-in-bottom>
|
||||
// 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({
|
||||
// // 默认语言,可选值<zh-cn|en>
|
||||
// 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,
|
||||
// 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
||||
layoutMode: 'Classic',
|
||||
// 后台主页面切换动画,可选值<slide-right|slide-left|el-fade-in-linear|el-fade-in|el-zoom-in-center|el-zoom-in-top|el-zoom-in-bottom>
|
||||
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({
|
||||
// 默认语言,可选值<zh-cn|en>
|
||||
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,
|
||||
// // 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
||||
// layoutMode: 'Classic',
|
||||
// // 后台主页面切换动画,可选值<slide-right|slide-left|el-fade-in-linear|el-fade-in|el-zoom-in-center|el-zoom-in-top|el-zoom-in-bottom>
|
||||
// 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({
|
||||
// // 默认语言,可选值<zh-cn|en>
|
||||
// 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
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ const tableStore = new TableStore({
|
||||
echarts.value.Grade(tableStore.table.data.voltageStatistics)
|
||||
echarts.value.Relation(tableStore.table.data.monthlyStatistics)
|
||||
table.value.info(tableStore.table.data)
|
||||
|
||||
}
|
||||
})
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
@@ -259,7 +259,7 @@ const tableStore: any = new TableStore({
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
console.log(tableStore.table.data)
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -139,9 +139,9 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大终端数:" prop="nodeDevNum" class="top">
|
||||
<el-form-item label="最大终端数:" prop="nodeDevNum" class="top" >
|
||||
<el-input
|
||||
v-model="formData.nodeDevNum"
|
||||
v-model.trim.number="formData.nodeDevNum"
|
||||
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
||||
maxlength="5"
|
||||
placeholder="请输入最大终端数"
|
||||
@@ -149,7 +149,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="最大进程数:" prop="maxProcessNum" class="top">
|
||||
<el-input
|
||||
v-model="formData.maxProcessNum"
|
||||
v-model.trim.number="formData.maxProcessNum"
|
||||
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
||||
maxlength="5"
|
||||
placeholder="请根据监测点规模填写合适进程数(1个进程最大可承载200个监测点)"
|
||||
@@ -209,7 +209,8 @@ import {
|
||||
updateNode,
|
||||
nodeDeviceTree,
|
||||
updateDeviceProcess,
|
||||
askRestartProcess
|
||||
askRestartProcess,
|
||||
allotTerminal
|
||||
} from '@/api/device-boot/Business'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
@@ -289,7 +290,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '最大监测点数量',
|
||||
title: '最大终端数量',
|
||||
field: 'nodeDevNum'
|
||||
},
|
||||
{
|
||||
@@ -351,7 +352,7 @@ const tableStore = new TableStore({
|
||||
},
|
||||
click: row => {
|
||||
askRestartProcess({
|
||||
deviceRebootType: null,
|
||||
deviceRebootType: 1,
|
||||
nodeId: row.id,
|
||||
processNo: 1
|
||||
}).then(res => {
|
||||
@@ -384,7 +385,32 @@ const tableStore = new TableStore({
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '分配终端',
|
||||
type: 'primary',
|
||||
icon: 'InfoFilled',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'primary',
|
||||
title: '确定分配终端吗?'
|
||||
},
|
||||
click: row => {
|
||||
if (!hasDevices.value) {
|
||||
ElMessage.warning('此前置机下无设备,无法分配终端!');
|
||||
return;
|
||||
}
|
||||
allotTerminal({
|
||||
nodeId: row.id
|
||||
}).then(res => {
|
||||
ElMessage.success(res.message)
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -452,9 +478,9 @@ const currentChangeEvent = () => {
|
||||
const restart = (data: any) => {
|
||||
// console.log('🚀 ~ restart ~ data:', data)
|
||||
askRestartProcess({
|
||||
deviceRebootType: data.processNo,
|
||||
deviceRebootType: null,
|
||||
nodeId: nodeId.value,
|
||||
processNo: 2
|
||||
processNo: data.processNo
|
||||
}).then(res => {
|
||||
ElMessage.success('重启成功')
|
||||
currentChangeEvent()
|
||||
|
||||
@@ -604,56 +604,74 @@ const maintenanceData = reactive({
|
||||
//上节点选择
|
||||
const checkLeft = (checkedNodes: any, checkedKeys: any) => {
|
||||
maintenanceData.upNode = checkedNodes.id
|
||||
if (maintenanceData.upNode === maintenanceData.downNode) {
|
||||
menuTreeRight.value?.setCheckedKeys([])
|
||||
maintenanceData.downNode = ''
|
||||
}
|
||||
if (checkedKeys.checkedKeys.length > 1) {
|
||||
menuTreeLeft.value?.setCheckedKeys([checkedNodes.id])
|
||||
}
|
||||
if (maintenanceData.upNode === maintenanceData.downNode) {
|
||||
menuTreeRight.value?.setCheckedKeys([])
|
||||
maintenanceData.downNode = ''
|
||||
}
|
||||
if (checkedKeys.checkedKeys.length > 1) {
|
||||
menuTreeLeft.value?.setCheckedKeys([checkedNodes.id])
|
||||
}
|
||||
}
|
||||
|
||||
//下节点选择
|
||||
const checkRight = (checkedNodes: any, checkedKeys: any) => {
|
||||
maintenanceData.downNode = checkedNodes.id
|
||||
if (maintenanceData.downNode === maintenanceData.upNode) {
|
||||
menuTreeLeft.value?.setCheckedKeys([])
|
||||
maintenanceData.upNode = ''
|
||||
}
|
||||
if (checkedKeys.checkedKeys.length > 1) {
|
||||
menuTreeRight.value?.setCheckedKeys([checkedNodes.id])
|
||||
}
|
||||
|
||||
if (maintenanceData.downNode === maintenanceData.upNode) {
|
||||
menuTreeLeft.value?.setCheckedKeys([])
|
||||
maintenanceData.upNode = ''
|
||||
}
|
||||
if (checkedKeys.checkedKeys.length > 1) {
|
||||
menuTreeRight.value?.setCheckedKeys([checkedNodes.id])
|
||||
}
|
||||
}
|
||||
|
||||
//节点维护提交
|
||||
const maintenanceOnsubmit = () => {
|
||||
for (let i = 0; i < bind.value.length; i++) {
|
||||
if (bind.value[i][0] == maintenanceData.upNode) {
|
||||
for (let j = 0; j < bind.value.length; j++) {
|
||||
if (bind.value[j][1] == maintenanceData.downNode) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '上下节点无法选择相同母线!!!'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if(maintenanceData.downNode == '' || maintenanceData.upNode == '') {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请确保上下节点各自选择一个母线!'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (bindLevel.value != 5) {
|
||||
for (let i = 0; i < bind.value.length; i++) {
|
||||
if (maintenanceData.upNode == bind.value[i][1] && maintenanceData.downNode == bind.value[i][0]) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '上下节点无法选择相同母线!!!'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (maintenanceData.upNode == maintenanceData.downNode) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '上下节点无法选择相同母线!'
|
||||
})
|
||||
}
|
||||
// for (let i = 0; i < bind.value.length; i++) {
|
||||
// if (bind.value[i] == maintenanceData.upNode) {
|
||||
// for (let j = 0; j < bind.value.length; j++) {
|
||||
|
||||
// if (bind.value[j] == maintenanceData.downNode) {
|
||||
// ElMessage({
|
||||
// type: 'warning',
|
||||
// message: '上下节点无法选择相同母线!!!'
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (bindLevel.value != 5) {
|
||||
// for (let i = 0; i < bind.value.length; i++) {
|
||||
// if (maintenanceData.upNode == bind.value[i] && maintenanceData.downNode == bind.value[i]) {
|
||||
// ElMessage({
|
||||
// type: 'warning',
|
||||
// message: '上下节点无法选择相同母线!!!'
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
nodeMaintenance(maintenanceData).then((res: any) => {
|
||||
if (res.code == 'A0000') {
|
||||
ElMessage({
|
||||
|
||||
@@ -53,12 +53,12 @@
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="box">
|
||||
<el-form :model="form" label-width="100px" ref="ruleFormRef">
|
||||
<el-form-item label="名称:">
|
||||
<el-form :model="form" label-width="100px" ref="ruleFormRef" :rules="rules">
|
||||
<el-form-item label="名称:" prop="tpName">
|
||||
<el-input v-model="form.tpName" placeholder="请输入" maxlength="32" show-word-limit clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述:" class="mt20">
|
||||
<el-input v-model="form.tfDescribe" placeholder="请输入" maxlength="32" show-word-limit clearable></el-input>
|
||||
<el-input v-model="form.tfDescribe" placeholder="请输入" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="mt20 ml20">
|
||||
<el-button @click="dialogFormVisible = false">取消</el-button>
|
||||
@@ -122,13 +122,8 @@ const menuTree = ref()
|
||||
const TableHeaderRef = ref()
|
||||
|
||||
const rules = reactive({
|
||||
name: [{ required: true, message: '名称不可为空', trigger: 'blur' }],
|
||||
ip: [{ required: true, message: 'ip不可为空', trigger: 'blur' }],
|
||||
nodeGrade: [{ required: true, message: '等级不可为空', trigger: 'blur' }],
|
||||
nodeDevNum: [{ required: true, message: '最大终端数不可为空', trigger: 'blur' }],
|
||||
maxProcessNum: [{ required: true, message: '最大进程数不可为空', trigger: 'blur' }],
|
||||
sort: [{ required: true, message: '排序不可为空', trigger: 'blur' }],
|
||||
remark: [{ required: true, message: '描述不可为空', trigger: 'blur' }]
|
||||
tpName: [{ required: true, message: '名称不可为空', trigger: 'blur' }],
|
||||
|
||||
})
|
||||
|
||||
const dialogFormVisible = ref(false)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<TableHeader :showReset="false" ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="关键字">
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" />
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
@@ -918,11 +920,14 @@ const setRealData = () => {
|
||||
}
|
||||
defineExpose({ setRealData })
|
||||
onMounted(() => {
|
||||
|
||||
init()
|
||||
|
||||
initRadioCharts()
|
||||
getLineDetail({ id: monitoringPoint.state.lineId }).then(res => {
|
||||
ptName.value = connection.filter(item => item.value == res.data.ptType)[0].code || ''
|
||||
})
|
||||
|
||||
})
|
||||
onBeforeUnmount(() => {
|
||||
dataSocket.socketServe?.closeWs()
|
||||
|
||||
@@ -1,357 +1,358 @@
|
||||
<template>
|
||||
<div class="pt50">
|
||||
<el-button class="shutDown" icon="el-icon-Back" @click="emit('shutDown')">返回</el-button>
|
||||
<div class="select">
|
||||
<div class="mr10">谐波次数</div>
|
||||
<el-select v-model="selectValue" style="width: 100px" @change="loading = true">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</div>
|
||||
<el-tabs type="border-card" v-model="activeName" @tab-change="handleClick" v-loading="loading">
|
||||
<el-tab-pane v-for="(item, index) in tabsList" :label="item.groupName" :name="index" :key="index">
|
||||
<div>
|
||||
<div class="realtrend_top">
|
||||
<div class="realtrend_table">
|
||||
<div class="thead_left">
|
||||
<p style="font-weight: 700; background-color: #f3f6f9">次数(次)</p>
|
||||
<p>{{ item.groupName }}{{ item.unit ? '(' + item.unit + ')' : '' }}</p>
|
||||
</div>
|
||||
<div class="thead_right">
|
||||
<div
|
||||
class="right_cell"
|
||||
v-for="i in selectValue == '1'
|
||||
? item.title.filter(num => (activeName == 1 ? num - 0.5 : num) % 2 !== 0)
|
||||
: selectValue == '2'
|
||||
? item.title.filter(num => (activeName == 1 ? num - 0.5 : num) % 2 == 0)
|
||||
: item.title"
|
||||
:key="index"
|
||||
>
|
||||
<p style="background-color: #f3f6f9">
|
||||
<span>{{ i }}次</span>
|
||||
</p>
|
||||
<p>
|
||||
<span>{{ item.data[`h${i}`] == 0 ? 0 : item.data[`h${i}`] || '/' }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt10" :style="height">
|
||||
<MyEchart ref="barCharts" :options="tabsList[0].echartsData"></MyEchart>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { getOverLimitData } from '@/api/device-boot/communicate'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||
const emit = defineEmits(['shutDown'])
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const options = [
|
||||
{
|
||||
value: '3',
|
||||
label: '全部'
|
||||
},
|
||||
|
||||
{
|
||||
value: '1',
|
||||
label: '奇次'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '偶次'
|
||||
}
|
||||
]
|
||||
const height = mainHeight(315)
|
||||
const barCharts = ref()
|
||||
const loading = ref(true)
|
||||
const crossTheLine: any = ref({})
|
||||
const tabsList: any = ref([
|
||||
{
|
||||
id: '6d5470f509ca271d7108a86e83bb283f',
|
||||
groupName: '谐波电压含有率',
|
||||
thdDataVOS: null,
|
||||
thdDataTdVODatas: null,
|
||||
unit: '%',
|
||||
title: [
|
||||
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
|
||||
],
|
||||
data: {},
|
||||
echartsData: {}
|
||||
},
|
||||
{
|
||||
id: 'ae31115b83f02f03a0d3bd65cb017121',
|
||||
groupName: '间谐波电压含有率',
|
||||
thdDataVOS: null,
|
||||
thdDataTdVODatas: null,
|
||||
unit: '%',
|
||||
title: [
|
||||
0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5,
|
||||
19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5,
|
||||
37.5, 38.5, 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5
|
||||
],
|
||||
data: {},
|
||||
echartsData: {}
|
||||
},
|
||||
{
|
||||
id: '8dc260f16280184e2b57d26668dc00b1',
|
||||
groupName: '谐波电流幅值',
|
||||
thdDataVOS: null,
|
||||
thdDataTdVODatas: null,
|
||||
unit: 'A',
|
||||
title: [
|
||||
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
|
||||
],
|
||||
|
||||
data: {},
|
||||
echartsData: {}
|
||||
}
|
||||
])
|
||||
|
||||
const selectValue = ref('1')
|
||||
const activeName = ref(0)
|
||||
// 点击tab
|
||||
const handleClick = (tab: any, event: any) => {
|
||||
loading.value = true
|
||||
}
|
||||
const init = (row: any) => {
|
||||
let vData: any = {}
|
||||
let iData: any = {}
|
||||
let SvData: any = {}
|
||||
for (let i = 1; i < 50; i++) {
|
||||
vData[`h${i + 1}`] =
|
||||
Math.floor(
|
||||
Math.max(...[row.V.A[`V` + (i + 1)], row.V.B[`V` + (i + 1)], row.V.C[`V` + (i + 1)]].map(Number)) * 100
|
||||
) / 100
|
||||
|
||||
SvData[`h${i - 0.5}`] =
|
||||
Math.floor(Math.max(...[row.V.A[`SV_` + (i-1)], row.V.B[`SV_` + (i-1)], row.V.C[`SV_` + (i-1)]].map(Number)) * 100) /
|
||||
100
|
||||
iData[`h${i + 1}`] =
|
||||
Math.floor(
|
||||
Math.max(...[row.I.A[`I` + (i + 1)], row.I.B[`I` + (i + 1)], row.I.C[`I` + (i + 1)]].map(Number)) * 100
|
||||
) / 100
|
||||
}
|
||||
SvData[`h49.5`] =
|
||||
Math.floor(Math.max(...[row.V.A[`SV_49`], row.V.B[`SV_49`], row.V.C[`SV_49`]].map(Number)) * 100) / 100
|
||||
|
||||
tabsList.value[0].data = vData
|
||||
tabsList.value[1].data = SvData
|
||||
tabsList.value[2].data = iData
|
||||
|
||||
let xData =
|
||||
selectValue.value == '1'
|
||||
? tabsList.value[activeName.value].title.filter(num => (activeName.value == 1 ? num - 0.5 : num) % 2 !== 0)
|
||||
: selectValue.value == '2'
|
||||
? tabsList.value[activeName.value].title.filter(num => (activeName.value == 1 ? num - 0.5 : num) % 2 === 0)
|
||||
: tabsList.value[activeName.value].title
|
||||
|
||||
barCharts.value[activeName.value]?.setOptions({
|
||||
title: {
|
||||
text: tabsList.value[activeName.value].groupName
|
||||
},
|
||||
xAxis: {
|
||||
data: xData.map(num => `${num}次`)
|
||||
},
|
||||
yAxis: {
|
||||
name: tabsList.value[activeName.value].unit // 更新Y轴单位
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: tabsList.value[activeName.value].groupName + '(' + tabsList.value[activeName.value].unit + ')' ,
|
||||
type: 'bar',
|
||||
data: xData.map(num => {
|
||||
return tabsList.value[activeName.value].data[`h${num}`]
|
||||
})
|
||||
},
|
||||
{
|
||||
name: '国标限值(' + tabsList.value[activeName.value].unit + ')', // 更新series名称中的单位
|
||||
type: 'bar',
|
||||
data: xData.map(num => {
|
||||
return (
|
||||
crossTheLine.value[
|
||||
activeName.value == 0
|
||||
? `uharm${num}`
|
||||
: activeName.value == 1
|
||||
? `inuharm${num + 0.5}`
|
||||
: `iharm${num}`
|
||||
] || ''
|
||||
)
|
||||
})
|
||||
}
|
||||
]
|
||||
})
|
||||
loading.value = false
|
||||
}
|
||||
// 设置ecartsData
|
||||
const echarts = (num: number) => {
|
||||
return {
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
xAxis: {
|
||||
name: "次数",
|
||||
data: []
|
||||
},
|
||||
yAxis: {name: tabsList.value[num].unit},
|
||||
color: ['#2E8B57', '#DAA520'],
|
||||
options: {
|
||||
series: [
|
||||
{
|
||||
name: tabsList.value[num].groupName,
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '国标限值('+ tabsList.value[num].unit +')',
|
||||
type: 'bar',
|
||||
// label: {
|
||||
// normal: {
|
||||
// position: 'top'
|
||||
// }
|
||||
// },
|
||||
data: []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
tabsList.value[0].echartsData = echarts(0)
|
||||
tabsList.value[1].echartsData = echarts(1)
|
||||
tabsList.value[2].echartsData = echarts(2)
|
||||
console.log(tabsList.value)
|
||||
getOverLimitData({ id: monitoringPoint.state.lineId }).then(res => {
|
||||
crossTheLine.value = res.data
|
||||
})
|
||||
})
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.shutDown {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
}
|
||||
.select {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
.realtrend_top {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.table {
|
||||
flex: 1;
|
||||
// min-height: 80px;
|
||||
cursor: pointer;
|
||||
min-height: 90px;
|
||||
max-height: 170px;
|
||||
border: 1px solid #eee;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
position: relative;
|
||||
|
||||
ul {
|
||||
width: auto;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
|
||||
li {
|
||||
flex: none;
|
||||
width: 100px;
|
||||
line-height: 40px;
|
||||
border: 1px solid #eee;
|
||||
text-align: center;
|
||||
list-style: none;
|
||||
}
|
||||
}
|
||||
|
||||
ul:nth-child(1) {
|
||||
li {
|
||||
font-weight: 800;
|
||||
background: #f4f6f9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// .table::-webkit-scrollbar {
|
||||
// display: none;
|
||||
// }
|
||||
|
||||
.realtrend_table {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: 150px;
|
||||
display: flex;
|
||||
border: 2px solid #eee;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
|
||||
.thead_left {
|
||||
width: 150px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
line-height: 50px;
|
||||
|
||||
padding-bottom: 5px;
|
||||
|
||||
p {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
border: 1px solid #eee;
|
||||
line-height: 38px;
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.thead_right {
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
display: flex;
|
||||
padding-bottom: 5px;
|
||||
|
||||
.right_cell {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
p {
|
||||
flex: none;
|
||||
min-width: 60px;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
border: 1px solid #eee;
|
||||
line-height: 38px;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
p:nth-child(1) {
|
||||
font-weight: 800;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="pt50">
|
||||
<el-button class="shutDown" icon="el-icon-Back" @click="emit('shutDown')">返回</el-button>
|
||||
<div class="select">
|
||||
<div class="mr10">谐波次数</div>
|
||||
<el-select v-model="selectValue" style="width: 100px" @change="loading = true">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</div>
|
||||
<el-tabs type="border-card" v-model="activeName" @tab-change="handleClick" v-loading="loading">
|
||||
<el-tab-pane v-for="(item, index) in tabsList" :label="item.groupName" :name="index" :key="index">
|
||||
<div>
|
||||
<div class="realtrend_top">
|
||||
<div class="realtrend_table">
|
||||
<div class="thead_left">
|
||||
<p style="font-weight: 700; background-color: #f3f6f9">次数(次)</p>
|
||||
<p>{{ item.groupName }}{{ item.unit ? '(' + item.unit + ')' : '' }}</p>
|
||||
</div>
|
||||
<div class="thead_right">
|
||||
<div
|
||||
class="right_cell"
|
||||
v-for="i in selectValue == '1'
|
||||
? item.title.filter(num => (activeName == 1 ? num - 0.5 : num) % 2 !== 0)
|
||||
: selectValue == '2'
|
||||
? item.title.filter(num => (activeName == 1 ? num - 0.5 : num) % 2 == 0)
|
||||
: item.title"
|
||||
:key="index"
|
||||
>
|
||||
<p style="background-color: #f3f6f9">
|
||||
<span>{{ i }}次</span>
|
||||
</p>
|
||||
<p>
|
||||
<span>{{ item.data[`h${i}`] == 0 ? 0 : item.data[`h${i}`] || '/' }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt10" :style="height">
|
||||
<MyEchart ref="barCharts" :options="tabsList[0].echartsData"></MyEchart>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { getOverLimitData } from '@/api/device-boot/communicate'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||
const emit = defineEmits(['shutDown'])
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const options = [
|
||||
{
|
||||
value: '3',
|
||||
label: '全部'
|
||||
},
|
||||
|
||||
{
|
||||
value: '1',
|
||||
label: '奇次'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '偶次'
|
||||
}
|
||||
]
|
||||
const height = mainHeight(315)
|
||||
const barCharts = ref()
|
||||
const loading = ref(true)
|
||||
const crossTheLine: any = ref({})
|
||||
const tabsList: any = ref([
|
||||
{
|
||||
id: '6d5470f509ca271d7108a86e83bb283f',
|
||||
groupName: '谐波电压含有率',
|
||||
thdDataVOS: null,
|
||||
thdDataTdVODatas: null,
|
||||
unit: '%',
|
||||
title: [
|
||||
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
|
||||
],
|
||||
data: {},
|
||||
echartsData: {}
|
||||
},
|
||||
{
|
||||
id: 'ae31115b83f02f03a0d3bd65cb017121',
|
||||
groupName: '间谐波电压含有率',
|
||||
thdDataVOS: null,
|
||||
thdDataTdVODatas: null,
|
||||
unit: '%',
|
||||
title: [
|
||||
0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5,
|
||||
// 16.5, 17.5, 18.5,
|
||||
// 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5,
|
||||
// 37.5, 38.5, 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5
|
||||
],
|
||||
data: {},
|
||||
echartsData: {}
|
||||
},
|
||||
{
|
||||
id: '8dc260f16280184e2b57d26668dc00b1',
|
||||
groupName: '谐波电流幅值',
|
||||
thdDataVOS: null,
|
||||
thdDataTdVODatas: null,
|
||||
unit: 'A',
|
||||
title: [
|
||||
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
|
||||
],
|
||||
|
||||
data: {},
|
||||
echartsData: {}
|
||||
}
|
||||
])
|
||||
|
||||
const selectValue = ref('1')
|
||||
const activeName = ref(0)
|
||||
// 点击tab
|
||||
const handleClick = (tab: any, event: any) => {
|
||||
loading.value = true
|
||||
}
|
||||
const init = (row: any) => {
|
||||
let vData: any = {}
|
||||
let iData: any = {}
|
||||
let SvData: any = {}
|
||||
for (let i = 1; i < 50; i++) {
|
||||
vData[`h${i + 1}`] =
|
||||
Math.floor(
|
||||
Math.max(...[row.V.A[`V` + (i + 1)], row.V.B[`V` + (i + 1)], row.V.C[`V` + (i + 1)]].map(Number)) * 100
|
||||
) / 100
|
||||
|
||||
SvData[`h${i - 0.5}`] =
|
||||
Math.floor(Math.max(...[row.V.A[`SV_` + (i-1)], row.V.B[`SV_` + (i-1)], row.V.C[`SV_` + (i-1)]].map(Number)) * 100) /
|
||||
100
|
||||
iData[`h${i + 1}`] =
|
||||
Math.floor(
|
||||
Math.max(...[row.I.A[`I` + (i + 1)], row.I.B[`I` + (i + 1)], row.I.C[`I` + (i + 1)]].map(Number)) * 100
|
||||
) / 100
|
||||
}
|
||||
SvData[`h49.5`] =
|
||||
Math.floor(Math.max(...[row.V.A[`SV_49`], row.V.B[`SV_49`], row.V.C[`SV_49`]].map(Number)) * 100) / 100
|
||||
|
||||
tabsList.value[0].data = vData
|
||||
tabsList.value[1].data = SvData
|
||||
tabsList.value[2].data = iData
|
||||
|
||||
let xData =
|
||||
selectValue.value == '1'
|
||||
? tabsList.value[activeName.value].title.filter(num => (activeName.value == 1 ? num - 0.5 : num) % 2 !== 0)
|
||||
: selectValue.value == '2'
|
||||
? tabsList.value[activeName.value].title.filter(num => (activeName.value == 1 ? num - 0.5 : num) % 2 === 0)
|
||||
: tabsList.value[activeName.value].title
|
||||
|
||||
barCharts.value[activeName.value]?.setOptions({
|
||||
title: {
|
||||
text: tabsList.value[activeName.value].groupName
|
||||
},
|
||||
xAxis: {
|
||||
data: xData.map(num => `${num}次`)
|
||||
},
|
||||
yAxis: {
|
||||
name: tabsList.value[activeName.value].unit // 更新Y轴单位
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: tabsList.value[activeName.value].groupName + '(' + tabsList.value[activeName.value].unit + ')' ,
|
||||
type: 'bar',
|
||||
data: xData.map(num => {
|
||||
return tabsList.value[activeName.value].data[`h${num}`]
|
||||
})
|
||||
},
|
||||
{
|
||||
name: '国标限值(' + tabsList.value[activeName.value].unit + ')', // 更新series名称中的单位
|
||||
type: 'bar',
|
||||
data: xData.map(num => {
|
||||
return (
|
||||
crossTheLine.value[
|
||||
activeName.value == 0
|
||||
? `uharm${num}`
|
||||
: activeName.value == 1
|
||||
? `inuharm${num + 0.5}`
|
||||
: `iharm${num}`
|
||||
] || ''
|
||||
)
|
||||
})
|
||||
}
|
||||
]
|
||||
})
|
||||
loading.value = false
|
||||
}
|
||||
// 设置ecartsData
|
||||
const echarts = (num: number) => {
|
||||
return {
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
xAxis: {
|
||||
name: "次数",
|
||||
data: []
|
||||
},
|
||||
yAxis: {name: tabsList.value[num].unit},
|
||||
color: ['#2E8B57', '#DAA520'],
|
||||
options: {
|
||||
series: [
|
||||
{
|
||||
name: tabsList.value[num].groupName,
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '国标限值('+ tabsList.value[num].unit +')',
|
||||
type: 'bar',
|
||||
// label: {
|
||||
// normal: {
|
||||
// position: 'top'
|
||||
// }
|
||||
// },
|
||||
data: []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
tabsList.value[0].echartsData = echarts(0)
|
||||
tabsList.value[1].echartsData = echarts(1)
|
||||
tabsList.value[2].echartsData = echarts(2)
|
||||
console.log(tabsList.value)
|
||||
getOverLimitData({ id: monitoringPoint.state.lineId }).then(res => {
|
||||
crossTheLine.value = res.data
|
||||
})
|
||||
})
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.shutDown {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
}
|
||||
.select {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
.realtrend_top {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.table {
|
||||
flex: 1;
|
||||
// min-height: 80px;
|
||||
cursor: pointer;
|
||||
min-height: 90px;
|
||||
max-height: 170px;
|
||||
border: 1px solid #eee;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
position: relative;
|
||||
|
||||
ul {
|
||||
width: auto;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
|
||||
li {
|
||||
flex: none;
|
||||
width: 100px;
|
||||
line-height: 40px;
|
||||
border: 1px solid #eee;
|
||||
text-align: center;
|
||||
list-style: none;
|
||||
}
|
||||
}
|
||||
|
||||
ul:nth-child(1) {
|
||||
li {
|
||||
font-weight: 800;
|
||||
background: #f4f6f9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// .table::-webkit-scrollbar {
|
||||
// display: none;
|
||||
// }
|
||||
|
||||
.realtrend_table {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: 150px;
|
||||
display: flex;
|
||||
border: 2px solid #eee;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
|
||||
.thead_left {
|
||||
width: 150px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
line-height: 50px;
|
||||
|
||||
padding-bottom: 5px;
|
||||
|
||||
p {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
border: 1px solid #eee;
|
||||
line-height: 38px;
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.thead_right {
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
display: flex;
|
||||
padding-bottom: 5px;
|
||||
|
||||
.right_cell {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
p {
|
||||
flex: none;
|
||||
min-width: 60px;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
border: 1px solid #eee;
|
||||
line-height: 38px;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
p:nth-child(1) {
|
||||
font-weight: 800;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -116,7 +116,7 @@ const tableStore = new TableStore({
|
||||
item.data[k.r][k.c].v ? (item.data[k.r][k.c] = k.v) : ''
|
||||
})
|
||||
})
|
||||
console.log(tableStore.table.data)
|
||||
|
||||
setTimeout(() => {
|
||||
luckysheet.create({
|
||||
container: 'luckysheet',
|
||||
@@ -129,6 +129,13 @@ const tableStore = new TableStore({
|
||||
data: tableStore.table.data
|
||||
})
|
||||
}, 10)
|
||||
},
|
||||
resetCallback: () => {
|
||||
// 重置模板策略为第一个选项
|
||||
if (templatePolicy.value && templatePolicy.value.length > 0) {
|
||||
Template.value = templatePolicy.value[0]
|
||||
reportForm.value = templatePolicy.value[0]?.reportForm
|
||||
}
|
||||
}
|
||||
})
|
||||
const loading = ref(false)
|
||||
@@ -154,7 +161,7 @@ const changetype = (val: any) => {
|
||||
reportForm.value = val.reportForm
|
||||
}
|
||||
const selectChange = () => {
|
||||
console.log('🚀 ~ selectChange ~ tableStore.table.data.lnegth :', tableStore.table.data.length)
|
||||
//console.log('🚀 ~ selectChange ~ tableStore.table.data.lnegth :', tableStore.table.data.length)
|
||||
if (tableStore.table.data.length != 0) {
|
||||
setTimeout(() => {
|
||||
luckysheet && luckysheet?.resize()
|
||||
@@ -165,6 +172,13 @@ const selectChange = () => {
|
||||
const handleNodeClick = (data: any, node: any) => {
|
||||
if (data.level == 6) {
|
||||
dotList.value = data
|
||||
|
||||
TableHeaderRef.value.setTheDate(3)
|
||||
// 重置模板策略为第一个选项
|
||||
if (templatePolicy.value && templatePolicy.value.length > 0) {
|
||||
Template.value = templatePolicy.value[0]
|
||||
reportForm.value = templatePolicy.value[0]?.reportForm
|
||||
}
|
||||
tableStore.index()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ const exportEvent = () => {
|
||||
form.append('type', '0')
|
||||
form.append('startTime', TableHeaderRef.value.datePickerRef.timeValue[0])
|
||||
form.append('endTime', TableHeaderRef.value.datePickerRef.timeValue[1])
|
||||
console.log('🚀 ~ exportEvent ~ uploadList.value:', uploadList.value?.raw)
|
||||
//console.log('🚀 ~ exportEvent ~ uploadList.value:', uploadList.value?.raw)
|
||||
form.append('file', uploadList.value?.raw || '')
|
||||
// 特殊字符正则表达式
|
||||
const specialCharRegex = /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/
|
||||
|
||||
@@ -100,10 +100,10 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{ field: 'areaName', title: '区域',minWidth: 100 },
|
||||
{ field: 'gdName', title: '地级区' ,minWidth: 100},
|
||||
{ field: 'gdName', title: '供电公司' ,minWidth: 100},
|
||||
{
|
||||
field: 'bdName',
|
||||
title: '供电公司',
|
||||
title: '场站',
|
||||
minWidth: 100
|
||||
},
|
||||
{ field: 'objName', title: '对象名称' , minWidth: 240},
|
||||
|
||||
@@ -98,9 +98,9 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="评价筛选">
|
||||
<!-- <el-form-item label="评价筛选">
|
||||
<el-input v-model="tableStore.table.params.evaluate" clearable placeholder="输入关键字筛选" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
@@ -145,10 +145,10 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{ field: 'areaName', title: '区域', minWidth: 100 },
|
||||
{ field: 'gdName', title: '地级区', minWidth: 100 },
|
||||
{ field: 'gdName', title: '供电公司', minWidth: 100 },
|
||||
{
|
||||
field: 'bdName',
|
||||
title: '供电公司',
|
||||
title: '场站',
|
||||
minWidth: 100
|
||||
},
|
||||
{ field: 'manufacturer', title: '厂家', minWidth: 100 },
|
||||
@@ -219,7 +219,7 @@ tableStore.table.params.statisticalType = classificationData[0]
|
||||
tableStore.table.params.serverName = 'harmonic-boot'
|
||||
tableStore.table.params.comFlag = []
|
||||
tableStore.table.params.runFlag = []
|
||||
tableStore.table.params.evaluate = ''
|
||||
// tableStore.table.params.evaluate = ''
|
||||
tableStore.table.params.powerFlag = 2
|
||||
tableStore.table.params.monitorFlag = 2
|
||||
tableStore.table.params.scale = []
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="statistics-box">
|
||||
<MyEChart style="height: 250px" :options="picEChart1" />
|
||||
<el-table size="small" height="250px" :data="resembleData">
|
||||
<el-table-column prop="name" label="触发类型" width="80px" align="center" />
|
||||
<el-table-column prop="name" label="暂降类型" width="80px" align="center" />
|
||||
<el-table-column prop="value" label="暂降次数" width="80px" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
@@ -384,7 +384,7 @@ const startRunTest = () => {
|
||||
// 下载报告
|
||||
const downloadTheReport = (url: string) => {
|
||||
getFileNameAndFilePath({ filePath: url }).then((res: any) => {
|
||||
console.log(res.data.url, 'res')
|
||||
//console.log(res.data.url, 'res')
|
||||
const link = document.createElement('a')
|
||||
link.href = res.data.url
|
||||
link.download = res.data.name
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
import { ref, reactive, defineExpose, computed } from 'vue'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { Console } from 'console'
|
||||
|
||||
const areaData: any = ref([])
|
||||
const levelData: any = ref([])
|
||||
@@ -69,16 +70,23 @@ const tableHeaderLevel = ref<any[]>([
|
||||
const frequency = ref<number>(875)
|
||||
|
||||
const info = (list: any, searchBeginTime: any, searchEndTime: any,selectedAreaName: string) => {
|
||||
|
||||
Time.value = [searchBeginTime, searchEndTime]
|
||||
frequency.value = list.areaStatistics.frequencySum
|
||||
areaName.value = selectedAreaName // 更新区域名称
|
||||
|
||||
let allSarfi9 = 0
|
||||
|
||||
list.areaStatistics.areaCalculation.forEach((item: any) => {
|
||||
allSarfi9 += item.sarfi9
|
||||
})
|
||||
|
||||
areaData.value = [
|
||||
{
|
||||
areaName: '总计',
|
||||
monitoringPoints: list.areaStatistics.monitoringPointSum,
|
||||
frequency: list.areaStatistics.frequencySum,
|
||||
sarfi9: '/'
|
||||
sarfi9: allSarfi9,
|
||||
},
|
||||
...list.areaStatistics.areaCalculation
|
||||
]
|
||||
@@ -91,19 +99,23 @@ const info = (list: any, searchBeginTime: any, searchEndTime: any,selectedAreaNa
|
||||
},
|
||||
...list.voltageStatistics.voltageLevelCalculation
|
||||
]
|
||||
|
||||
|
||||
|
||||
let all = 0
|
||||
|
||||
list.monthlyStatistics.monthCalculation.forEach((item: any) => {
|
||||
all += item.linked + item.notAssociated
|
||||
})
|
||||
|
||||
shareData.value = [
|
||||
{
|
||||
month: '总计',
|
||||
notAssociated: all.toFixed(2)
|
||||
notAssociated: all,
|
||||
},
|
||||
...list.monthlyStatistics.monthCalculation
|
||||
...list.monthlyStatistics.monthCalculation.map((item: any) => ({
|
||||
month: item.month,
|
||||
notAssociated: item.notAssociated + item.linked
|
||||
}))
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<span style="color: red; font-size: 12px">注:触发类型仅统计暂降原因为短路故障事件</span>
|
||||
<span style="color: red; font-size: 12px">注:暂降类型仅统计暂降原因为短路故障事件</span>
|
||||
|
||||
<div class="statistics-main">
|
||||
<template v-if="flag">
|
||||
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<vxe-table height="auto" auto-resize :data="resembleData" v-bind="defaultAttribute">
|
||||
<vxe-column field="name" title="触发类型"></vxe-column>
|
||||
<vxe-column field="name" title="暂降类型"></vxe-column>
|
||||
<vxe-column field="value" title="暂降次数"></vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
@@ -86,7 +86,7 @@ const info = (res: any) => {
|
||||
}
|
||||
resemble.value = {
|
||||
title: {
|
||||
text: '触发类型'
|
||||
text: '暂降类型'
|
||||
},
|
||||
legend: {
|
||||
type: 'scroll',
|
||||
@@ -109,7 +109,7 @@ const info = (res: any) => {
|
||||
options: {
|
||||
series: [
|
||||
{
|
||||
name: '触发类型',
|
||||
name: '暂降类型',
|
||||
type: 'pie',
|
||||
center: ['50%', '50%'],
|
||||
selectedOffset: 30,
|
||||
|
||||
@@ -22,11 +22,11 @@ const Processing = (list: any) => {
|
||||
let echartsArr: string[] = []
|
||||
list.areaCalculation.forEach((item: any) => {
|
||||
echartsndArr.push(item.areaName)
|
||||
if (item.frequency == 0) {
|
||||
item.frequency = 1.1
|
||||
} else if (item.frequency == 1) {
|
||||
item.frequency = 1.3
|
||||
}
|
||||
// if (item.frequency == 0) {
|
||||
// item.frequency = 1.1
|
||||
// } else if (item.frequency == 1) {
|
||||
// item.frequency = 1.3
|
||||
// }
|
||||
echartsArr.push(item.frequency)
|
||||
})
|
||||
areaStatistics.value = {
|
||||
@@ -48,7 +48,7 @@ const Processing = (list: any) => {
|
||||
return html
|
||||
}
|
||||
},
|
||||
|
||||
color: ['#07CCCA'],
|
||||
legend: {
|
||||
data: ['暂降次数']
|
||||
},
|
||||
@@ -68,7 +68,7 @@ const Processing = (list: any) => {
|
||||
normal: {
|
||||
//这里是颜色
|
||||
color: function (params: any) {
|
||||
if (params.data == 1.1) {
|
||||
if (params.data == 0) {
|
||||
return '#B3B3B3'
|
||||
} else {
|
||||
return '#07CCCA '
|
||||
@@ -90,11 +90,11 @@ const Grade = (list: any) => {
|
||||
let echartsArr: string[] = []
|
||||
list.voltageLevelCalculation.forEach((item: any) => {
|
||||
echartsndArr.push(item.voltageLevel)
|
||||
if (item.frequency == 0) {
|
||||
item.frequency = 1.1
|
||||
} else if (item.frequency == 1) {
|
||||
item.frequency = 1.3
|
||||
}
|
||||
// if (item.frequency == 0) {
|
||||
// item.frequency = 1.1
|
||||
// } else if (item.frequency == 1) {
|
||||
// item.frequency = 1.3
|
||||
// }
|
||||
echartsArr.push(item.frequency)
|
||||
})
|
||||
|
||||
@@ -117,7 +117,7 @@ const Grade = (list: any) => {
|
||||
return html
|
||||
}
|
||||
},
|
||||
|
||||
color: ['#07CCCA'],
|
||||
legend: {
|
||||
data: ['暂降次数']
|
||||
},
|
||||
@@ -137,7 +137,7 @@ const Grade = (list: any) => {
|
||||
normal: {
|
||||
//这里是颜色
|
||||
color: function (params: any) {
|
||||
if (params.data == 1.1) {
|
||||
if (params.data == 0) {
|
||||
return '#B3B3B3'
|
||||
} else {
|
||||
return '#07CCCA '
|
||||
@@ -174,18 +174,21 @@ const Relation = (list: any, interval: number) => {
|
||||
// item.linked = 3.14159;
|
||||
// item.notAssociated = 3.14159;
|
||||
// }
|
||||
if (item.linked == 0) {
|
||||
item.linked = 1.1
|
||||
} else if (item.linked == 1) {
|
||||
item.linked = 1.3
|
||||
}
|
||||
// if (item.linked == 0) {
|
||||
// item.linked = 1.1
|
||||
// } else if (item.linked == 1) {
|
||||
// item.linked = 1.3
|
||||
// }
|
||||
echartsArr.push(item.linked)
|
||||
if (item.notAssociated == 0) {
|
||||
item.notAssociated = 1.1
|
||||
} else if (item.notAssociated == 1) {
|
||||
item.notAssociated = 1.3
|
||||
}
|
||||
echartswArr.push(item.notAssociated)
|
||||
// if (item.notAssociated == 0) {
|
||||
// item.notAssociated = 1.1
|
||||
// } else if (item.notAssociated == 1) {
|
||||
// item.notAssociated = 1.3
|
||||
// }
|
||||
//echartswArr.push(item.notAssociated)
|
||||
const total = item.notAssociated + item.linked
|
||||
echartswArr.push(total)
|
||||
|
||||
})
|
||||
monthlyStatistics.value = {
|
||||
title: {
|
||||
@@ -208,9 +211,11 @@ const Relation = (list: any, interval: number) => {
|
||||
},
|
||||
|
||||
legend: {
|
||||
data: ['未关联暂降次数', '已关联处理事件']
|
||||
data: ['暂降次数']
|
||||
//data: ['未关联暂降次数', '已关联处理事件']
|
||||
},
|
||||
color: ['#07CCCA', '#Ff6600'],
|
||||
color: ['#07CCCA'],
|
||||
//color: ['#07CCCA', '#Ff6600'],
|
||||
xAxis: {
|
||||
name: '月份', // 给X轴加单位
|
||||
data: echartsndArr
|
||||
@@ -221,11 +226,11 @@ const Relation = (list: any, interval: number) => {
|
||||
options: {
|
||||
series: [
|
||||
{
|
||||
name: '未关联暂降次数',
|
||||
name: '暂降次数',
|
||||
type: 'bar',
|
||||
barMaxWidth: 30,
|
||||
barMinHeight: 5,
|
||||
data: echartswArr,
|
||||
data: echartswArr,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
label: {
|
||||
@@ -238,7 +243,7 @@ const Relation = (list: any, interval: number) => {
|
||||
}
|
||||
},
|
||||
color: function (params: any) {
|
||||
if (params.data == 1.1) {
|
||||
if (params.data == 0) {
|
||||
return '#B3B3B3'
|
||||
} else {
|
||||
return '#07CCCA '
|
||||
@@ -247,32 +252,32 @@ const Relation = (list: any, interval: number) => {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '已关联处理事件',
|
||||
type: 'bar',
|
||||
barMaxWidth: 30,
|
||||
data: echartsArr,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
label: {
|
||||
// show: true, //数字开启显示
|
||||
textStyle: {
|
||||
//数值样式
|
||||
color: '#fff',
|
||||
fontSize: 14,
|
||||
fontWeight: 600
|
||||
}
|
||||
},
|
||||
color: function (params: any) {
|
||||
if (params.data == 1.1) {
|
||||
return '#B3B3B3'
|
||||
} else {
|
||||
return '#Ff6600'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// {
|
||||
// name: '已关联处理事件',
|
||||
// type: 'bar',
|
||||
// barMaxWidth: 30,
|
||||
// data: echartsArr,
|
||||
// itemStyle: {
|
||||
// normal: {
|
||||
// label: {
|
||||
// // show: true, //数字开启显示
|
||||
// textStyle: {
|
||||
// //数值样式
|
||||
// color: '#fff',
|
||||
// fontSize: 14,
|
||||
// fontWeight: 600
|
||||
// }
|
||||
// },
|
||||
// color: function (params: any) {
|
||||
// if (params.data == 0) {
|
||||
// return '#B3B3B3'
|
||||
// } else {
|
||||
// return '#Ff6600'
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -291,3 +296,4 @@ const layout = mainHeight(150) as any
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
>>>>>>> c902dabb73a92b43a23970969d750508558b5400
|
||||
|
||||
@@ -39,6 +39,7 @@ const tableStore = new TableStore({
|
||||
tableStore.table.params.searchEndTime,
|
||||
currentAreaName.value // 传递当前区域名称
|
||||
)
|
||||
console.log('11111',tableStore.table.data)
|
||||
echarts.value.Processing(tableStore.table.data.areaStatistics)
|
||||
echarts.value.Grade(tableStore.table.data.voltageStatistics)
|
||||
echarts.value.Relation(JSON.parse(JSON.stringify(tableStore.table.data.monthlyStatistics)))
|
||||
|
||||
@@ -240,7 +240,7 @@ const tableStore = new TableStore({
|
||||
field: 'featureAmplitude',
|
||||
title: '暂降(骤升)幅值(%)',
|
||||
minWidth: '130',
|
||||
formatter: ({ row }: any) => {
|
||||
formatter: (row: any) => {
|
||||
return Math.floor(row.cellValue * 10000) / 100
|
||||
}
|
||||
},
|
||||
|
||||
@@ -29,6 +29,17 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
<el-pagination
|
||||
class="mt10"
|
||||
:currentPage="form.pageNum"
|
||||
:page-size="form.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
background
|
||||
:layout="'sizes,total, ->, prev, pager, next, jumper'"
|
||||
:total="total"
|
||||
@size-change="onTableSizeChange"
|
||||
@current-change="onTableCurrentChange"
|
||||
></el-pagination>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="!view">
|
||||
@@ -168,7 +179,12 @@ tableStore.table.params.searchValue = ''
|
||||
const bxactiveName = ref('ssbx')
|
||||
const boxoList = ref({})
|
||||
const wp = ref({})
|
||||
|
||||
const form = ref({
|
||||
pageSize: 20,
|
||||
pageNum: 1,
|
||||
id: ''
|
||||
})
|
||||
const total = ref(0)
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
@@ -180,13 +196,47 @@ onMounted(() => {
|
||||
|
||||
})
|
||||
})
|
||||
//分析记录管理
|
||||
const analysis1 = () => {
|
||||
queryRelevantLogPage({}).then((res: any) => {
|
||||
|
||||
// 分页
|
||||
const onTableSizeChange = (val: number) => {
|
||||
form.value.pageSize = val
|
||||
form.value.pageNum = 1 // 改变每页条数时回到第一页
|
||||
loadAnalysisData() // 重新加载数据
|
||||
|
||||
}
|
||||
|
||||
const onTableCurrentChange = (val: number) => {
|
||||
form.value.pageNum = val
|
||||
loadAnalysisData() // 重新加载数据
|
||||
|
||||
}
|
||||
|
||||
// 封装数据加载逻辑
|
||||
const loadAnalysisData = async () => {
|
||||
try {
|
||||
const params = {
|
||||
pageNum: form.value.pageNum,
|
||||
pageSize: form.value.pageSize
|
||||
}
|
||||
const res: any = await queryRelevantLogPage(params)
|
||||
AnalysisData.value = res.data.records
|
||||
})
|
||||
total.value = res.data.total
|
||||
} catch (error) {
|
||||
console.error('获取分析记录失败:', error)
|
||||
AnalysisData.value = []
|
||||
total.value = 0
|
||||
}
|
||||
}
|
||||
|
||||
//分析记录管理
|
||||
const analysis1 = async () => {
|
||||
// 初始化分页参数
|
||||
form.value.pageNum = 1
|
||||
await loadAnalysisData()
|
||||
dialogAnalysis.value = true
|
||||
}
|
||||
|
||||
|
||||
// 启动关联分析
|
||||
const firing = () => {
|
||||
processEvents({
|
||||
@@ -207,9 +257,8 @@ const details = (row: any) => {
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
queryRelevantLogPage({}).then((res: any) => {
|
||||
AnalysisData.value = res.data.records
|
||||
})
|
||||
// 重新加载当前页的数据
|
||||
loadAnalysisData()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -217,4 +266,6 @@ const backbxlb = () => {
|
||||
view.value = true
|
||||
view2.value = false
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@@ -50,9 +50,9 @@ const init = () => {
|
||||
getPlot(formData).then((res: any) => {
|
||||
const gongData = gongfunction(res.data.voltageToleranceCurveDataList)
|
||||
data.gs = res.data.voltageToleranceCurveDataList.length
|
||||
data.krr = gongData.pointI.length
|
||||
data.bkrr = gongData.pointIun.length
|
||||
|
||||
data.krr = gongData.pointF.length
|
||||
data.bkrr = gongData.pointFun.length
|
||||
|
||||
options.value = {
|
||||
// backgroundColor: "#f9f9f9", //地图背景色深蓝
|
||||
title: {
|
||||
@@ -251,12 +251,14 @@ function gongfunction(arr: any) {
|
||||
}
|
||||
|
||||
if (xx < 0.05) {
|
||||
|
||||
standF++
|
||||
pointF.push({
|
||||
value: point,
|
||||
itemStyle: { normal: { color: 'green' } }
|
||||
})
|
||||
} else if (xx < 0.2) {
|
||||
|
||||
if (yy > 50) {
|
||||
standF++
|
||||
pointF.push({
|
||||
@@ -272,6 +274,7 @@ function gongfunction(arr: any) {
|
||||
}
|
||||
} else if (xx < 0.5) {
|
||||
if (yy > 70) {
|
||||
|
||||
standF++
|
||||
pointF.push({
|
||||
value: point,
|
||||
@@ -286,6 +289,7 @@ function gongfunction(arr: any) {
|
||||
}
|
||||
} else {
|
||||
if (yy > 80) {
|
||||
|
||||
standF++
|
||||
pointF.push({
|
||||
value: point,
|
||||
|
||||
@@ -249,7 +249,7 @@ const initThird = () => {
|
||||
backgroundColor: '#fff', //背景色,
|
||||
animation: false,
|
||||
title: {
|
||||
text: '触发类型',
|
||||
text: '暂降类型',
|
||||
x: 'center'
|
||||
},
|
||||
|
||||
@@ -277,7 +277,7 @@ const initThird = () => {
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '触发类型',
|
||||
name: '暂降类型',
|
||||
type: 'pie',
|
||||
radius: '65%',
|
||||
center: ['50%', '60%'],
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12" class="mTop">
|
||||
<div class="grid-content">
|
||||
<div class="divBox">触发类型</div>
|
||||
<div class="divBox">暂降类型</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="mTop">
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<el-option v-for="item in sign" :key="item.id" :label="item.name" :value="item.algoDescribe" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="网公司标志:">
|
||||
<el-form-item label="网公司标志">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.monitorFlag"
|
||||
collapse-tags
|
||||
@@ -130,6 +130,7 @@ const tableStore = new TableStore({
|
||||
width: '140',
|
||||
formatter: (row: any) => {
|
||||
// return (row.cellValue * 100).toFixed(0)
|
||||
|
||||
return Math.floor(row.cellValue * 10000) / 100
|
||||
}
|
||||
},
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12" class="mTop">
|
||||
<div class="grid-content">
|
||||
<div class="divBox">触发类型</div>
|
||||
<div class="divBox">暂降类型</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="mTop">
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div class="grid-content">
|
||||
<div class="divBox">触发类型</div>
|
||||
<div class="divBox">暂降类型</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
||||
@@ -30,6 +30,7 @@ import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
|
||||
const dictData = useDictData()
|
||||
const tableRef = ref()
|
||||
const options = ref({})
|
||||
@@ -88,6 +89,7 @@ const tableStore = new TableStore({
|
||||
text: '暂降原因统计',
|
||||
top: '20'
|
||||
},
|
||||
|
||||
legend: {
|
||||
type: 'scroll',
|
||||
orient: 'vertical',
|
||||
|
||||
@@ -35,44 +35,44 @@ const height = mainHeight(80).height
|
||||
const activeName = ref('1')
|
||||
const activeName1 = ref('1')
|
||||
const list = ref([
|
||||
// {
|
||||
// name: '暂态严重度统计',
|
||||
// id: '3',
|
||||
// isGroup: true,
|
||||
// url: '/event-boot/report/getSeverity',
|
||||
// column: [
|
||||
// {
|
||||
// title: '暂态事件严重度(前二十)',
|
||||
// children: [
|
||||
// {
|
||||
// field: 'index',
|
||||
// title: '序号',
|
||||
// width: '80',
|
||||
// formatter: (row: any) => {
|
||||
// return (
|
||||
// (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize +
|
||||
// row.rowIndex +
|
||||
// 1
|
||||
// )
|
||||
// }
|
||||
// },
|
||||
// { field: 'startTime', title: '暂态事件发生时刻', width: '200' },
|
||||
// { field: 'gdName', title: '供电公司' },
|
||||
// { field: 'subName', title: '变电站' },
|
||||
// { field: 'lineName', title: '监测点' },
|
||||
// { field: 'voltageScale', title: '监测点电压等级' },
|
||||
// { field: 'loadType', title: '干扰源类型' },
|
||||
// {
|
||||
// field: 'featureAmplitude',
|
||||
// title: '暂降(骤升)幅值(%)',
|
||||
// formatter: ({ row }: any) => (row.featureAmplitude * 100).toFixed(2)
|
||||
// },
|
||||
// { field: 'duration', title: '持续时间(s)' },
|
||||
// { field: 'severity', title: '暂态事件严重度' }
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
name: '暂态严重度统计',
|
||||
id: '3',
|
||||
isGroup: true,
|
||||
url: '/event-boot/report/getSeverity',
|
||||
column: [
|
||||
{
|
||||
title: '暂态事件严重度(前二十)',
|
||||
children: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (
|
||||
(tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize +
|
||||
row.rowIndex +
|
||||
1
|
||||
)
|
||||
}
|
||||
},
|
||||
{ field: 'startTime', title: '暂态事件发生时刻', width: '200' },
|
||||
{ field: 'gdName', title: '供电公司' },
|
||||
{ field: 'subName', title: '变电站' },
|
||||
{ field: 'lineName', title: '监测点' },
|
||||
{ field: 'voltageScale', title: '监测点电压等级' },
|
||||
{ field: 'loadType', title: '干扰源类型' },
|
||||
{
|
||||
field: 'featureAmplitude',
|
||||
title: '暂降(骤升)幅值(%)',
|
||||
formatter: ({ row }: any) => (row.featureAmplitude * 100).toFixed(2)
|
||||
},
|
||||
{ field: 'duration', title: '持续时间(s)' },
|
||||
{ field: 'severity', title: '暂态事件严重度' }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '暂降事件列表',
|
||||
id: '4',
|
||||
@@ -108,7 +108,7 @@ const list = ref([
|
||||
}
|
||||
},
|
||||
{ field: 'duration', title: '持续时间(s)', width: '120' },
|
||||
{ field: 'advanceType', title: '触发类型(机器判断)', width: '150' }
|
||||
{ field: 'advanceType', title: '暂降类型(机器判断)', width: '150' }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
<template #tip>
|
||||
<div>请上传xml文件</div>
|
||||
<div>请上传xml文件,文件名不能包含空格</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
@@ -92,6 +92,12 @@ const isValidFile = (file: UploadRawFile) => {
|
||||
return false
|
||||
}
|
||||
|
||||
// 检查文件名是否包含空格
|
||||
if (file.name.includes(' ')) {
|
||||
ElMessage.error('文件名不能包含空格,请重命名文件后再上传')
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
// 上传报告
|
||||
@@ -102,6 +108,14 @@ const handleExceed: UploadProps['onExceed'] = files => {
|
||||
uploadRef.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
|
||||
// 检查文件名是否包含空格
|
||||
if (file.name.includes(' ')) {
|
||||
ElMessage.error('文件名不能包含空格,请重命名文件后再上传')
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
uploadRef.value!.handleStart(file)
|
||||
}
|
||||
|
||||
@@ -116,6 +130,13 @@ const submit = async () => {
|
||||
return ElMessage.warning('请上传icd文件')
|
||||
}
|
||||
if (reportPath.value[0]?.raw != undefined) {
|
||||
|
||||
// 检查文件名是否包含空格
|
||||
if (reportPath.value[0].raw.name.includes(' ')) {
|
||||
ElMessage.error('文件名不能包含空格,请重命名文件后再上传')
|
||||
return
|
||||
}
|
||||
|
||||
await uploadFile(reportPath.value[0].raw, '/icd/').then(res => {
|
||||
//治理工程验收报告
|
||||
form.fileName = res.data.fileName.split('.')[0]
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
clearable
|
||||
placeholder="请输入任务名称"
|
||||
placeholder="请输入icd名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
@@ -82,7 +82,8 @@ const tableStore: any = new TableStore({
|
||||
{ field: 'updateBy', title: '修改人' },
|
||||
{ field: 'updateTime', title: '修改时间' },
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
width: '220',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
@@ -147,9 +148,13 @@ const okRun = () => {
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
getIcdList().then(res => {
|
||||
options.value = res.data
|
||||
})
|
||||
tableStore.index()
|
||||
getIcdList()
|
||||
.then(res => {
|
||||
options.value = res.data
|
||||
tableStore.index()
|
||||
})
|
||||
.catch(err => {
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
style="width: 100%"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="会话超时时间(秒):" prop="sessionTime">
|
||||
<el-form-item label="会话超时时间(分钟):" prop="sessionTime">
|
||||
<el-input-number v-model.number="form.sessionTime" :min="10" style="width: 100%"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="token刷新时间(秒):" prop="sessionRefreshTime">
|
||||
<el-form-item label="token刷新时间(分钟):" prop="sessionRefreshTime">
|
||||
<el-input-number
|
||||
v-model.number="form.sessionRefreshTime"
|
||||
:min="10"
|
||||
|
||||
Reference in New Issue
Block a user