Compare commits
33 Commits
0c71b2ac32
...
2025-11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa07112605 | ||
|
|
c09bea9e04 | ||
|
|
22cd6088a3 | ||
|
|
faf7ba98a6 | ||
|
|
b90f70c72d | ||
|
|
d38b426527 | ||
|
|
79a246cd87 | ||
|
|
58ee36c6a5 | ||
|
|
515dcfe76c | ||
|
|
031fab286b | ||
|
|
58bc269940 | ||
|
|
80182cdc6f | ||
|
|
8ce2968bee | ||
|
|
1a146afcd7 | ||
|
|
800ec7f0cf | ||
|
|
e824f4823a | ||
|
|
2476d2401e | ||
|
|
f043b6dc1a | ||
|
|
09bf34700a | ||
|
|
f32673c92a | ||
|
|
2c7b5a8583 | ||
|
|
3745d91a9d | ||
|
|
9117a6e3c6 | ||
|
|
e759f443d3 | ||
|
|
af3f9fe607 | ||
|
|
d97e97f51c | ||
|
|
5e1a628d53 | ||
|
|
acc5e93731 | ||
|
|
93586255fc | ||
|
|
cf51ba9ff0 | ||
|
|
67d9aaf958 | ||
|
|
f1439e0464 | ||
|
|
29c88b56dc |
@@ -6,8 +6,10 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"dev:zl": "vite --mode zl",
|
||||
"dev:ypt": "vite --mode ypt",
|
||||
"build": "vite build",
|
||||
"build:zl": "vite build --mode zl",
|
||||
"build:ypt": "vite build --mode ypt",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
28
src/api/cs-device-boot/sensitiveLoadMange.ts
Normal file
28
src/api/cs-device-boot/sensitiveLoadMange.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 新增敏感用户
|
||||
export function saveUser(data: any) {
|
||||
return request({
|
||||
url: '/cs-harmonic-boot/pqSensitiveUser/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改敏感用户
|
||||
export function updateUser(data: any) {
|
||||
return request({
|
||||
url: '/cs-harmonic-boot/pqSensitiveUser/update',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除敏感用户
|
||||
export function deleteUser(data: any) {
|
||||
return request({
|
||||
url: '/cs-harmonic-boot/pqSensitiveUser/delete',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import request from '@/utils/request'
|
||||
// 主要监测点列表查询>>分页
|
||||
export function mainLineList(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/mainLine/list',
|
||||
url: '/cs-harmonic-boot/mainLine/list',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -11,7 +11,7 @@ export function mainLineList(data: any) {
|
||||
// 主要监测点指标越限详情
|
||||
export function statLimitRateDetails(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/mainLine/statLimitRateDetails',
|
||||
url: '/cs-harmonic-boot/mainLine/statLimitRateDetails',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -38,7 +38,7 @@ export function trendData(data: any) {
|
||||
// 每日越限占比统计
|
||||
export function totalLimitStatisticsDetails(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/totalLimitStatistics/details',
|
||||
url: '/cs-harmonic-boot/totalLimitStatistics/details',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -47,7 +47,7 @@ export function totalLimitStatisticsDetails(data: any) {
|
||||
// 总体指标越限统计列表
|
||||
export function totalLimitStatisticsList(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/totalLimitStatistics/list',
|
||||
url: '/cs-harmonic-boot/totalLimitStatistics/list',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -56,7 +56,7 @@ export function totalLimitStatisticsList(data: any) {
|
||||
// 总体指标越限统计数据
|
||||
export function totalLimitStatisticsData(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/totalLimitStatistics/data',
|
||||
url: '/cs-harmonic-boot/totalLimitStatistics/data',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -65,7 +65,7 @@ export function totalLimitStatisticsData(data: any) {
|
||||
// 指标越限程度数据
|
||||
export function limitExtentData(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/limitRateDetailD/limitExtentData',
|
||||
url: '/cs-harmonic-boot/limitRateDetailD/limitExtentData',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -73,7 +73,7 @@ export function limitExtentData(data: any) {
|
||||
// 指标日趋势图数据
|
||||
export function limitExtentDayData(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/limitRateDetailD/limitExtentDayData',
|
||||
url: '/cs-harmonic-boot/limitRateDetailD/limitExtentDayData',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -82,7 +82,7 @@ export function limitExtentDayData(data: any) {
|
||||
// 指标越限明细日历数据
|
||||
export function limitCalendarData(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/limitRateDetailD/limitCalendarData',
|
||||
url: '/cs-harmonic-boot/limitRateDetailD/limitCalendarData',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -100,7 +100,7 @@ export function fittingData(data: any) {
|
||||
//指标越限时间概率分布
|
||||
export function limitTimeProbabilityData(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/limitRateDetailD/limitTimeProbabilityData',
|
||||
url: '/cs-harmonic-boot/limitRateDetailD/limitTimeProbabilityData',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -109,7 +109,7 @@ export function limitTimeProbabilityData(data: any) {
|
||||
//指标越限程度概率分布
|
||||
export function limitProbabilityData(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/limitRateDetailD/limitProbabilityData',
|
||||
url: '/cs-harmonic-boot/limitRateDetailD/limitProbabilityData',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -119,7 +119,7 @@ export function limitProbabilityData(data: any) {
|
||||
// 电网侧指标越限统计列表
|
||||
export function gridSideLimitStatisticsList(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/gridSideLimitStatistics/list',
|
||||
url: '/cs-harmonic-boot/gridSideLimitStatistics/list',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -128,7 +128,7 @@ export function gridSideLimitStatisticsList(data: any) {
|
||||
// 电网侧指标越限统计数据
|
||||
export function gridSideLimitStatisticsData(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/gridSideLimitStatistics/data',
|
||||
url: '/cs-harmonic-boot/gridSideLimitStatistics/data',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -234,4 +234,31 @@ export function netEventTable(data: any) {
|
||||
})
|
||||
}
|
||||
|
||||
// 分页查询暂降事件
|
||||
export function pageEvent(data: any) {
|
||||
return request({
|
||||
url: '/cs-harmonic-boot/event/pageEvent',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 暂态事件波形分析
|
||||
export function analyseWave(data: any) {
|
||||
return request({
|
||||
url: '/cs-harmonic-boot/event/analyseWave',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 暂态监测点下拉框接口
|
||||
export function getSimpleLine() {
|
||||
return request({
|
||||
url: '/cs-device-boot/csline/getSimpleLine',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,14 +3,15 @@ import createAxios from '@/utils/request'
|
||||
// 获取参数指标
|
||||
export function getIndex() {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/customReport/reportChooseTree',
|
||||
// url: '/harmonic-boot/customReport/reportChooseTree',
|
||||
url: '/cs-harmonic-boot/customReport/reportChooseTree',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//、查询数据激活报表模板
|
||||
export function updateTemplateActive(data) {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/customReport/updateTemplateActive',
|
||||
url: '/cs-harmonic-boot/customReport/updateTemplateActive',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -19,7 +20,8 @@ export function updateTemplateActive(data) {
|
||||
//获取报表模板 //部门树查询
|
||||
export function getTemplateList(data:any) {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/customReport/getTemplateList',
|
||||
// url: '/harmonic-boot/customReport/getTemplateList',
|
||||
url: '/cs-harmonic-boot/customReport/getTemplateList',
|
||||
// url:'/api3/harmonic-boot/customReport/getTemplateList',
|
||||
method: 'post',
|
||||
data
|
||||
@@ -28,7 +30,7 @@ export function getTemplateList(data:any) {
|
||||
//删除报表模板
|
||||
export function delTemplate(data:any) {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/customReport/delTemplate',
|
||||
url: '/cs-harmonic-boot/customReport/delTemplate',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -37,7 +39,7 @@ export function delTemplate(data:any) {
|
||||
//修改获取数据
|
||||
export function getCustomReportTemplateById(params) {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/customReport/getCustomReportTemplateById',
|
||||
url: '/cs-harmonic-boot/customReport/getCustomReportTemplateById',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
@@ -46,7 +48,7 @@ export function getCustomReportTemplateById(params) {
|
||||
//修改获取数据
|
||||
export function viewCustomReportTemplateById(params) {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/customReport/viewCustomReportTemplateById',
|
||||
url: '/cs-harmonic-boot/customReport/viewCustomReportTemplateById',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
@@ -54,16 +56,17 @@ export function viewCustomReportTemplateById(params) {
|
||||
//修改模板
|
||||
export function dateTemplateup(data) {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/customReport/updateTemplate',
|
||||
url: '/cs-harmonic-boot/customReport/updateTemplate',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//新增报表模板
|
||||
export function addTemplate(data) {
|
||||
export function addTemplate(data:any) {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/customReport/addTemplate',
|
||||
// url: '/harmonic-boot/customReport/addTemplate',
|
||||
url: '/cs-harmonic-boot/customReport/addTemplate',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -71,7 +74,7 @@ export function addTemplate(data) {
|
||||
//模板对应指标替换
|
||||
export function getCustomReport(data: any) {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/customReport/getCustomReport',
|
||||
url: '/cs-harmonic-boot/customReport/getCustomReport',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
@@ -79,7 +82,7 @@ export function getCustomReport(data: any) {
|
||||
//绑定模板
|
||||
export function updateBindTemplate(data) {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/customReport/updateBindTemplate',
|
||||
url: '/cs-harmonic-boot/customReport/updateBindTemplate',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -87,7 +90,7 @@ export function updateBindTemplate(data) {
|
||||
//根据模板ID查询数据
|
||||
export function getDataByTempId(params) {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/customReport/getDataByTempId',
|
||||
url: '/cs-harmonic-boot/customReport/getDataByTempId',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
@@ -95,7 +98,7 @@ export function getDataByTempId(params) {
|
||||
//根据部门查询模板
|
||||
export function getTemplateByDept(params) {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/customReport/getTemplateByDept',
|
||||
url: '/cs-harmonic-boot/customReport/getTemplateByDept',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
@@ -144,7 +147,7 @@ export function updateFile(data) {
|
||||
//合格率报告
|
||||
export function pageTable(data) {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/qualifiedReport/pageTable',
|
||||
url: '/cs-harmonic-boot/qualifiedReport/pageTable',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -152,14 +155,16 @@ export function pageTable(data) {
|
||||
//合格率报告
|
||||
export function targetLimitChooseTree() {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/customReport/targetLimitChooseTree',
|
||||
// url: '/harmonic-boot/customReport/targetLimitChooseTree',
|
||||
url: '/cs-harmonic-boot/customReport/targetLimitChooseTree',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//监测点指标
|
||||
export function terminalChooseTree() {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/customReport/terminalChooseTree',
|
||||
// url: '/harmonic-boot/customReport/terminalChooseTree',
|
||||
url: '/cs-harmonic-boot/customReport/terminalChooseTree',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -88,8 +88,9 @@ export const updateStatistical = (data: any) => {
|
||||
// 单位绑定
|
||||
export function codeDicTree(data: any) {
|
||||
return createAxios({
|
||||
url: '/system-boot/dictTree/codeDicTree',
|
||||
method: 'get',
|
||||
// url: '/system-boot/dictTree/codeDicTree',
|
||||
url: '/system-boot/dictTree/queryByCodeList',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<el-descriptions-item align="center" label="不可容忍">{{ data.bkrr }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<my-echart
|
||||
v-loading="tableStore.table.loading"
|
||||
ref="chartRef"
|
||||
class="tall"
|
||||
:options="echartList"
|
||||
@@ -18,10 +19,10 @@
|
||||
}"
|
||||
@chart-click="handleChartClick"
|
||||
/>
|
||||
<el-dialog v-model="isWaveCharts" draggable title="瞬时/RMS波形" append-to-body width="70%">
|
||||
<el-dialog v-model="isWaveCharts" v-if="isWaveCharts" draggable :title="dialogTitle" append-to-body width="70%">
|
||||
<waveFormAnalysis
|
||||
v-loading="loading"
|
||||
v-if="isWaveCharts"
|
||||
|
||||
ref="waveFormAnalysisRef"
|
||||
@handleHideCharts="isWaveCharts = false"
|
||||
:wp="wp"
|
||||
@@ -33,28 +34,22 @@
|
||||
import { ref, onMounted, provide, reactive, watch, h } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { getTimeOfTheMonth } from '@/utils/formatTime'
|
||||
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useTimeCacheStore } from '@/stores/timeCache'
|
||||
import { analyseWave } from '@/api/common'
|
||||
|
||||
import { ElMessage } from 'element-plus'
|
||||
const prop = defineProps({
|
||||
w: { type: [String, Number]},
|
||||
h: { type: [String, Number]},
|
||||
width: { type: [String, Number]},
|
||||
height: { type: [String, Number]},
|
||||
timeKey: { type: [String, Number]},
|
||||
w: { type: [String, Number] },
|
||||
h: { type: [String, Number] },
|
||||
width: { type: [String, Number] },
|
||||
height: { type: [String, Number] },
|
||||
timeKey: { type: [String, Number] },
|
||||
timeValue: { type: Object }
|
||||
})
|
||||
|
||||
const headerHeight = ref(57)
|
||||
|
||||
const route = useRoute()
|
||||
const timeCacheStore = useTimeCacheStore()
|
||||
|
||||
const dialogTitle = ref('波形分析')
|
||||
const selectChange = (showSelect: any, height: any, datePickerValue?: any) => {
|
||||
headerHeight.value = height
|
||||
|
||||
@@ -77,7 +72,7 @@ const fullscreen = computed(() => {
|
||||
}
|
||||
})
|
||||
|
||||
const echartList = ref({})
|
||||
const echartList = ref()
|
||||
|
||||
const chartRef = ref()
|
||||
// 波形
|
||||
@@ -104,7 +99,7 @@ const tableStore: any = new TableStore({
|
||||
showPage: false,
|
||||
|
||||
column: [],
|
||||
beforeSearchFun: () => {
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.searchBeginTime = tableStore.table.params.searchBeginTime || prop.timeValue?.[0]
|
||||
tableStore.table.params.searchEndTime = tableStore.table.params.searchEndTime || prop.timeValue?.[1]
|
||||
},
|
||||
@@ -113,7 +108,6 @@ const tableStore: any = new TableStore({
|
||||
data.gs = tableStore.table.data.length
|
||||
data.krr = gongData.pointI.length
|
||||
data.bkrr = gongData.pointIun.length
|
||||
// console.log(gongData,'789000')
|
||||
echartList.value = {
|
||||
title: {
|
||||
text: `F47曲线`
|
||||
@@ -229,7 +223,7 @@ const tableStore: any = new TableStore({
|
||||
{
|
||||
name: '不可容忍事件',
|
||||
type: 'scatter',
|
||||
symbol: 'rect',
|
||||
symbol: 'circle',
|
||||
symbolSize: 8,
|
||||
data: gongData.pointFun,
|
||||
legendSymbol: 'rect'
|
||||
@@ -263,8 +257,9 @@ function gongfunction(arr: any) {
|
||||
let yy = arr[i].eventValue
|
||||
let time = arr[i].time
|
||||
let eventId = arr[i].eventId
|
||||
let lineName = arr[i].lineName
|
||||
// let index =arr[i].eventDetailIndex;
|
||||
point = [xx, yy, time, eventId]
|
||||
point = [xx, yy, time, eventId, lineName]
|
||||
|
||||
if (xx <= 0.003) {
|
||||
let line = 0
|
||||
@@ -413,33 +408,45 @@ onMounted(() => {
|
||||
const handleChartClick = (params: any) => {
|
||||
if (params.seriesName === '可容忍事件') {
|
||||
// 处理可容忍事件点击
|
||||
ElMessage.info(`点击了可容忍事件: 持续时间${params.value[0]}s, 幅值${params.value[1].toFixed(2)}%`)
|
||||
dialogTitle.value = '可容忍事件波形分析'
|
||||
handleTolerableEventClick(params)
|
||||
} else if (params.seriesName === '不可容忍事件') {
|
||||
dialogTitle.value = '不可容忍事件波形分析'
|
||||
// 处理不可容忍事件点击
|
||||
ElMessage.info(`点击了不可容忍事件: 持续时间${params.value[0]}s, 幅值${params.value[1].toFixed(2)}%`)
|
||||
handleIntolerableEventClick(params)
|
||||
// ElMessage.info(`点击了不可容忍事件: 持续时间${params.value[0]}s, 幅值${params.value[1].toFixed(2)}%`)
|
||||
handleTolerableEventClick(params)
|
||||
}
|
||||
}
|
||||
|
||||
// 可容忍事件点击处理函数
|
||||
const handleTolerableEventClick = async (row: any) => {
|
||||
console.log('可容忍事件详情:', row)
|
||||
isWaveCharts.value = true
|
||||
loading.value = true
|
||||
isWaveCharts.value = true
|
||||
await analyseWave(row.id)
|
||||
nextTick(() => {
|
||||
if (waveFormAnalysisRef.value) {
|
||||
//waveFormAnalysisRef.value.setHeight(false, 360)
|
||||
waveFormAnalysisRef.value.setHeight(999, 130, 1.6666666)
|
||||
}
|
||||
})
|
||||
const messageInstance = ElMessage.info(`正在加载,请稍等...`)
|
||||
await analyseWave(row.value[3]) //eventId
|
||||
.then(res => {
|
||||
row.loading1 = false
|
||||
if (res != undefined) {
|
||||
boxoList.value = row
|
||||
boxoList.value.featureAmplitude = row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth - 0 : null
|
||||
boxoList.value.systemType = 'WX'
|
||||
boxoList.value = {
|
||||
persistTime: row.value[0], //持续时间
|
||||
featureAmplitude: (row.value[1] / 100).toFixed(2), //残余电压
|
||||
startTime: row.value[2], //时间
|
||||
lineName: row.value[4] //监测点名称
|
||||
}
|
||||
boxoList.value.systemType = 'YPT'
|
||||
wp.value = res.data
|
||||
}
|
||||
|
||||
isWaveCharts.value = true
|
||||
loading.value = false
|
||||
})
|
||||
.catch(() => {
|
||||
messageInstance.close()
|
||||
row.loading1 = false
|
||||
loading.value = false
|
||||
})
|
||||
|
||||
@@ -66,7 +66,7 @@ const echartList = ref()
|
||||
|
||||
const dailyTrendChartRef = ref()
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/harmonic-boot/limitRateDetailD/limitExtentData',
|
||||
url: '/cs-harmonic-boot/limitRateDetailD/limitExtentData',
|
||||
method: 'POST',
|
||||
|
||||
showPage: false,
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -4,26 +4,13 @@
|
||||
<TableHeader :showReset="false" datePicker @selectChange="selectChange" v-if="fullscreen">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="报表模板">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.tempId"
|
||||
placeholder="请选择报表模板"
|
||||
clearable
|
||||
>
|
||||
<el-select v-model="tableStore.table.params.tempId" placeholder="请选择报表模板" clearable>
|
||||
<el-option v-for="item in templateList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测对象">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.sensitiveUserId"
|
||||
placeholder="请选择监测对象"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in idList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
<el-select v-model="tableStore.table.params.sensitiveUserId" placeholder="请选择监测对象" clearable>
|
||||
<el-option v-for="item in idList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -31,8 +18,8 @@
|
||||
<el-button @click="downloadExcel" class="" type="primary" icon="el-icon-Download">导出excel</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<div style="display: flex;">
|
||||
<div
|
||||
<div style="display: flex">
|
||||
<div
|
||||
id="luckysheet"
|
||||
:style="{
|
||||
width: `calc(${prop.width} )`,
|
||||
@@ -43,15 +30,13 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, reactive, watch, h, computed } from 'vue'
|
||||
import { ref, onMounted, provide, reactive, watch, h, computed, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { exportExcel } from '@/views/govern/reportForms/export.js'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useConfig } from '@/stores/config'
|
||||
import Json from './index.json'
|
||||
import JsonAfter from './index.json'
|
||||
import { getTemplateList } from '@/api/harmonic-boot/luckyexcel'
|
||||
import { getListByIds } from '@/api/harmonic-boot/cockpit/cockpit'
|
||||
import Json from './index.json'
|
||||
|
||||
const prop = defineProps({
|
||||
w: { type: [String, Number] },
|
||||
@@ -62,26 +47,6 @@ const prop = defineProps({
|
||||
timeValue: { type: Object }
|
||||
})
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/user-boot/role/selectRoleDetail?id=0',
|
||||
method: 'POST',
|
||||
|
||||
showPage: false,
|
||||
exportName: '主要监测点列表',
|
||||
column: [],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.searchBeginTime = tableStore.table.params.searchBeginTime || prop.timeValue?.[0]
|
||||
tableStore.table.params.searchEndTime = tableStore.table.params.searchEndTime || prop.timeValue?.[1]
|
||||
},
|
||||
loadCallback: () => {}
|
||||
})
|
||||
|
||||
const tableRef = ref()
|
||||
provide('tableRef', tableRef)
|
||||
tableStore.table.params.power = '1'
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
// 报表模板列表
|
||||
const templateList = ref()
|
||||
|
||||
@@ -93,9 +58,11 @@ const initListByIds = () => {
|
||||
getListByIds({}).then((res: any) => {
|
||||
if (res.data.length > 0) {
|
||||
idList.value = res.data
|
||||
|
||||
if (!tableStore.table.params.sensitiveUserId && idList.value?.length > 0) {
|
||||
tableStore.table.params.sensitiveUserId = idList.value[0].id
|
||||
}
|
||||
templateListData()
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -104,8 +71,11 @@ const templateListData = () => {
|
||||
getTemplateList({}).then(res => {
|
||||
templateList.value = res.data
|
||||
if (!tableStore.table.params.tempId && templateList.value?.length > 0) {
|
||||
tableStore.table.params.tempId = res.data[0].id
|
||||
tableStore.table.params.tempId = templateList.value[0].id
|
||||
}
|
||||
nextTick(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
}
|
||||
// 下载表格
|
||||
@@ -115,19 +85,6 @@ const downloadExcel = () => {
|
||||
|
||||
onMounted(() => {
|
||||
initListByIds()
|
||||
templateListData()
|
||||
luckysheet.create({
|
||||
container: 'luckysheet',
|
||||
title: '', // 表 头名
|
||||
lang: 'zh', // 中文
|
||||
showtoolbar: false, // 是否显示工具栏
|
||||
showinfobar: false, // 是否显示顶部信息栏
|
||||
showsheetbar: true, // 是否显示底部sheet按钮
|
||||
allowEdit: false, // 禁止所有编辑操作(必填)
|
||||
data: Json
|
||||
})
|
||||
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
const selectChange = (showSelect: any, height: any, datePickerValue?: any) => {
|
||||
@@ -149,6 +106,42 @@ const fullscreen = computed(() => {
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/cs-harmonic-boot/customReport/getSensitiveUserReport',
|
||||
method: 'POST',
|
||||
showPage: false,
|
||||
exportName: '治理效果报表',
|
||||
column: [],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.searchBeginTime = tableStore.table.params.searchBeginTime || prop.timeValue?.[0]
|
||||
tableStore.table.params.searchEndTime = tableStore.table.params.searchEndTime || prop.timeValue?.[1]
|
||||
if (!tableStore.table.params.sensitiveUserId && idList.value?.length > 0) {
|
||||
tableStore.table.params.sensitiveUserId = idList.value[0].id
|
||||
}
|
||||
if (!tableStore.table.params.tempId && templateList.value?.length > 0) {
|
||||
tableStore.table.params.tempId = templateList.value[0].id
|
||||
}
|
||||
},
|
||||
loadCallback: () => {
|
||||
luckysheet.create({
|
||||
container: 'luckysheet',
|
||||
title: '', // 表 头名
|
||||
lang: 'zh', // 中文
|
||||
showtoolbar: false, // 是否显示工具栏
|
||||
showinfobar: false, // 是否显示顶部信息栏
|
||||
showsheetbar: true, // 是否显示底部sheet按钮
|
||||
allowEdit: false, // 禁止所有编辑操作(必填)
|
||||
data: tableStore.table.data
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const tableRef = ref()
|
||||
provide('tableRef', tableRef)
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
watch(
|
||||
() => prop.timeKey,
|
||||
val => {
|
||||
|
||||
@@ -1,238 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<!--治理效果报表 -->
|
||||
<TableHeader :showReset="false" datePicker @selectChange="selectChange" v-if="fullscreen">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="监测对象">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.power"
|
||||
placeholder="请选择监测对象"
|
||||
clearable
|
||||
style="width: 130px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in powerList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button @click="downloadExcel" class="" type="primary" icon="el-icon-Download">导出excel</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
|
||||
<!-- 左右布局展示治理前后报表 -->
|
||||
<div class="report-container">
|
||||
<!-- 治理前报表 -->
|
||||
<div class="report-panel before">
|
||||
<div class="panel-header">治理前报表</div>
|
||||
<div
|
||||
id="luckysheet-before"
|
||||
:style="{
|
||||
width: '100%',
|
||||
height: `calc(${prop.height} - ${fullscreen ? '114px' : '57px'} + ${fullscreen ? 0 : 56}px)`
|
||||
}"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<!-- 治理后报表 -->
|
||||
<div class="report-panel after">
|
||||
<div class="panel-header">治理后报表</div>
|
||||
<div
|
||||
id="luckysheet-after"
|
||||
:style="{
|
||||
width: '100%',
|
||||
height: `calc(${prop.height} - ${fullscreen ? '114px' : '57px'} + ${fullscreen ? 0 : 56}px)`
|
||||
}"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, watch, computed } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { exportExcel } from '@/views/govern/reportForms/export.js'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import Json from './index.json'
|
||||
import JsonAfter from './index1.json'
|
||||
|
||||
const prop = defineProps({
|
||||
w: { type: [String, Number] },
|
||||
h: { type: [String, Number] },
|
||||
width: { type: [String, Number] },
|
||||
height: { type: [String, Number] },
|
||||
timeKey: { type: [String, Number] },
|
||||
timeValue: { type: Object }
|
||||
})
|
||||
|
||||
const powerList: any = ref([
|
||||
{
|
||||
label: '1#变压器',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '2#变压器',
|
||||
value: '2'
|
||||
}
|
||||
])
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/user-boot/role/selectRoleDetail?id=0',
|
||||
method: 'POST',
|
||||
showPage: false,
|
||||
exportName: '治理效果报表',
|
||||
column: [],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.searchBeginTime = tableStore.table.params.searchBeginTime || prop.timeValue?.[0]
|
||||
tableStore.table.params.searchEndTime = tableStore.table.params.searchEndTime || prop.timeValue?.[1]
|
||||
},
|
||||
loadCallback: () => {}
|
||||
})
|
||||
|
||||
const tableRef = ref()
|
||||
provide('tableRef', tableRef)
|
||||
tableStore.table.params.power = '1'
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
// 下载表格
|
||||
const downloadExcel = () => {
|
||||
// 可以选择导出治理前、治理后或两个报表
|
||||
const beforeSheets = luckysheetBefore.getAllSheets()
|
||||
const afterSheets = luckysheetAfter.getAllSheets()
|
||||
exportExcel([...beforeSheets, ...afterSheets], '治理效果对比报表')
|
||||
}
|
||||
|
||||
// 治理前和治理后的Luckysheet实例
|
||||
let luckysheetBefore: any
|
||||
let luckysheetAfter: any
|
||||
|
||||
onMounted(() => {
|
||||
// 创建治理前报表
|
||||
luckysheetBefore = luckysheet.create({
|
||||
container: 'luckysheet-before',
|
||||
title: '治理前',
|
||||
lang: 'zh',
|
||||
showtoolbar: false,
|
||||
showinfobar: false,
|
||||
showsheetbar: true,
|
||||
allowEdit: false,
|
||||
data: Json
|
||||
})
|
||||
|
||||
// 创建治理后报表
|
||||
luckysheetAfter = luckysheet.create({
|
||||
container: 'luckysheet-after',
|
||||
title: '治理后',
|
||||
lang: 'zh',
|
||||
showtoolbar: false,
|
||||
showinfobar: false,
|
||||
showsheetbar: true,
|
||||
allowEdit: false,
|
||||
data: JsonAfter // 使用治理后的数据
|
||||
})
|
||||
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
const selectChange = (showSelect: any, height: any, datePickerValue?: any) => {
|
||||
if (datePickerValue && datePickerValue.timeValue) {
|
||||
// 更新时间参数
|
||||
tableStore.table.params.searchBeginTime = datePickerValue.timeValue[0]
|
||||
tableStore.table.params.searchEndTime = datePickerValue.timeValue[1]
|
||||
|
||||
// 可以在这里更新报表数据
|
||||
updateReportData()
|
||||
}
|
||||
}
|
||||
|
||||
// 更新报表数据的方法
|
||||
const updateReportData = () => {
|
||||
// 这里可以根据时间参数更新治理前后的报表数据
|
||||
// 示例:重新加载数据或更新现有数据
|
||||
console.log('更新报表数据:', {
|
||||
beginTime: tableStore.table.params.searchBeginTime,
|
||||
endTime: tableStore.table.params.searchEndTime
|
||||
})
|
||||
}
|
||||
|
||||
// 计算是否全屏展示
|
||||
const fullscreen = computed(() => {
|
||||
const w = Number(prop.w)
|
||||
const h = Number(prop.h)
|
||||
if (!isNaN(w) && !isNaN(h) && w === 12 && h === 6) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
||||
watch(
|
||||
() => prop.timeKey,
|
||||
val => {
|
||||
tableStore.index()
|
||||
updateReportData()
|
||||
}
|
||||
)
|
||||
|
||||
watch(
|
||||
() => prop.timeValue,
|
||||
(newVal, oldVal) => {
|
||||
// 当外部时间值变化时,更新表格的时间参数
|
||||
if (newVal && (!oldVal || newVal[0] !== oldVal[0] || newVal[1] !== oldVal[1])) {
|
||||
tableStore.table.params.searchBeginTime = newVal[0]
|
||||
tableStore.table.params.searchEndTime = newVal[1]
|
||||
tableStore.index()
|
||||
updateReportData()
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.report-container {
|
||||
display: flex;
|
||||
height: calc(100% - 57px);
|
||||
|
||||
.report-panel {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: 1px solid var(--el-border-color);
|
||||
|
||||
&.before {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
&.after {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.panel-header {
|
||||
padding: 10px 15px;
|
||||
background-color: var(--el-color-primary-light-9);
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid var(--el-border-color);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
// 确保Luckysheet容器占满剩余空间
|
||||
:deep(#luckysheet-before),
|
||||
:deep(#luckysheet-after) {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-select) {
|
||||
min-width: 80px;
|
||||
}
|
||||
</style>
|
||||
@@ -58,7 +58,7 @@ const loop50 = (key: string) => {
|
||||
return list
|
||||
}
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/harmonic-boot/totalLimitStatistics/details',
|
||||
url: '/cs-harmonic-boot/totalLimitStatistics/details',
|
||||
method: 'POST',
|
||||
publicHeight: 30,
|
||||
showPage: false,
|
||||
|
||||
@@ -117,7 +117,7 @@ const initEcharts = () => {
|
||||
|
||||
const OverLimitDetailsRef = ref()
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/harmonic-boot/gridSideLimitStatistics/list',
|
||||
url: '/cs-harmonic-boot/gridSideLimitStatistics/list',
|
||||
method: 'POST',
|
||||
|
||||
showPage: false,
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
<!--指标越限明细 -->
|
||||
<TableHeader :showReset="false" @selectChange="selectChange" datePicker v-if="fullscreen"></TableHeader>
|
||||
<TableHeader
|
||||
:showReset="false"
|
||||
ref="TableHeaderRef"
|
||||
@selectChange="selectChange"
|
||||
datePicker
|
||||
v-if="fullscreen"
|
||||
:timeCacheFlag="false"
|
||||
></TableHeader>
|
||||
<el-calendar
|
||||
v-model="value"
|
||||
:style="{
|
||||
@@ -51,6 +58,8 @@ const headerHeight = ref(57)
|
||||
|
||||
const list = ref()
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
|
||||
dayjs.en.weekStart = 1 //设置日历的周起始日为星期一
|
||||
const value = ref(new Date())
|
||||
|
||||
@@ -82,46 +91,18 @@ const getTextForDate = (date: string) => {
|
||||
}
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
// url: '/user-boot/role/selectRoleDetail?id=0',
|
||||
url: '/harmonic-boot/limitRateDetailD/limitCalendarData',
|
||||
url: '/cs-harmonic-boot/limitRateDetailD/limitCalendarData',
|
||||
method: 'POST',
|
||||
showPage: false,
|
||||
column: [],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.searchBeginTime = tableStore.table.params.searchBeginTime || prop.timeValue?.[0]
|
||||
tableStore.table.params.searchEndTime = tableStore.table.params.searchEndTime || prop.timeValue?.[1]
|
||||
if (!fullscreen.value && prop.timeValue && Array.isArray(prop.timeValue)) {
|
||||
tableStore.table.params.searchBeginTime = prop.timeValue[0]
|
||||
tableStore.table.params.searchEndTime = prop.timeValue[1]
|
||||
}
|
||||
},
|
||||
loadCallback: () => {
|
||||
value.value = tableStore.table.params.searchBeginTime
|
||||
// 将后端返回的数据整合到 list 中
|
||||
// tableStore.table.data = [
|
||||
// {
|
||||
// "time": "2025-11-13",
|
||||
// "items": [
|
||||
// "闪变越限",
|
||||
// "谐波电流越限"
|
||||
// ],
|
||||
// "status": 1
|
||||
// },
|
||||
// {
|
||||
// "time": "2025-11-14",
|
||||
// "items": [
|
||||
// "频率偏差越限",
|
||||
// "三相电压不平衡越限",
|
||||
// "谐波电压越限",
|
||||
// "谐波电流越限",
|
||||
// "频率偏差越限",
|
||||
// "三相电压不平衡越限",
|
||||
// "谐波电压越限",
|
||||
// "谐波电流越限",
|
||||
// "频率偏差越限",
|
||||
// "三相电压不平衡越限",
|
||||
// "谐波电压越限",
|
||||
// "谐波电流越限"
|
||||
// ],
|
||||
// "status": 2
|
||||
// }
|
||||
// ]
|
||||
if (tableStore.table.data && tableStore.table.data.length > 0) {
|
||||
list.value = tableStore.table.data.map((item: any) => {
|
||||
// 将 items 数组转换为带换行的文本
|
||||
@@ -162,7 +143,15 @@ const setBackground = (value: string) => {
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
nextTick(() => {
|
||||
if (TableHeaderRef.value && typeof TableHeaderRef.value.setDatePicker === 'function') {
|
||||
TableHeaderRef.value.setDatePicker([{ label: '月份', value: 3 }])
|
||||
}
|
||||
if (fullscreen.value) {
|
||||
TableHeaderRef.value.setInterval(3)
|
||||
}
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
watch(
|
||||
() => prop.timeKey,
|
||||
@@ -172,20 +161,22 @@ watch(
|
||||
)
|
||||
watch(
|
||||
() => prop.timeValue,
|
||||
(newVal, oldVal) => {
|
||||
// 当外部时间值变化时,更新表格的时间参数
|
||||
if (newVal && (!oldVal || newVal[0] !== oldVal[0] || newVal[1] !== oldVal[1])) {
|
||||
tableStore.table.params.searchBeginTime = newVal[0]
|
||||
tableStore.table.params.searchEndTime = newVal[1]
|
||||
tableStore.index()
|
||||
}
|
||||
// (newVal, oldVal) => {
|
||||
// // 当外部时间值变化时,更新表格的时间参数
|
||||
// if (newVal && (!oldVal || newVal[0] !== oldVal[0] || newVal[1] !== oldVal[1])) {
|
||||
// tableStore.table.params.searchBeginTime = newVal[0]
|
||||
// tableStore.table.params.searchEndTime = newVal[1]
|
||||
// tableStore.index()
|
||||
// }
|
||||
// },
|
||||
val => {
|
||||
tableStore.index()
|
||||
},
|
||||
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
const addMenu = () => {}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-calendar) {
|
||||
|
||||
@@ -397,7 +397,7 @@ const initProbabilityData = () => {
|
||||
}
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/harmonic-boot/limitRateDetailD/limitTimeProbabilityData',
|
||||
url: '/cs-harmonic-boot/limitRateDetailD/limitTimeProbabilityData',
|
||||
method: 'POST',
|
||||
showPage: false,
|
||||
column: [],
|
||||
@@ -420,6 +420,7 @@ const tableStore: any = new TableStore({
|
||||
return {
|
||||
name: indexName,
|
||||
type: 'line',
|
||||
symbol: 'none',
|
||||
data: dataIndex.map((item: any) => [item.timePeriod, item.times])
|
||||
}
|
||||
})
|
||||
|
||||
@@ -63,7 +63,7 @@ const loop50 = (key: string) => {
|
||||
return list
|
||||
}
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/harmonic-boot/mainLine/statLimitRateDetails',
|
||||
url: '/cs-harmonic-boot/mainLine/statLimitRateDetails',
|
||||
method: 'POST',
|
||||
publicHeight: 30,
|
||||
showPage: false,
|
||||
|
||||
@@ -67,7 +67,7 @@ const selectChange = (showSelect: any, height: any, datePickerValue?: any) => {
|
||||
}
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/harmonic-boot/mainLine/list',
|
||||
url: '/cs-harmonic-boot/mainLine/list',
|
||||
method: 'POST',
|
||||
showPage: fullscreen.value ? true : false,
|
||||
exportName: '主要监测点列表',
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
width: prop.width,
|
||||
height: `calc(${prop.height} - ${headerHeight}px + ${fullscreen ? 0 : 56}px )`
|
||||
}"
|
||||
v-if="showEchart"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -94,8 +93,6 @@ const powerList: any = ref()
|
||||
|
||||
const countData: any = ref([])
|
||||
|
||||
const showEchart = ref(true)
|
||||
|
||||
const chartsList = ref<any>([])
|
||||
|
||||
// 计算是否全屏展示
|
||||
@@ -198,12 +195,6 @@ const setEchart = () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 检查是否有数据
|
||||
if (!chartsList.value || chartsList.value.length === 0) {
|
||||
showEchart.value = false // 没有数据时隐藏图表
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
// 用户功率数据和电能质量数据
|
||||
let powerData: any[] = []
|
||||
@@ -242,20 +233,11 @@ const setEchart = () => {
|
||||
const hasPowerData = processedPowerData.length > 0 && processedPowerData.some(item => item[1] !== null)
|
||||
const hasQualityData = processedQualityData.length > 0 && processedQualityData.some(item => item[1] !== null)
|
||||
|
||||
if (!hasPowerData && !hasQualityData) {
|
||||
showEchart.value = false
|
||||
return
|
||||
}
|
||||
|
||||
// 更新图表配置
|
||||
echartList.value.options.series[0].data = processedPowerData
|
||||
echartList.value.options.series[1].data = processedQualityData
|
||||
|
||||
// 确保图表显示
|
||||
showEchart.value = true
|
||||
} catch (error) {
|
||||
console.error('处理图表数据时出错:', error)
|
||||
showEchart.value = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,11 +312,9 @@ const tableStore: any = new TableStore({
|
||||
loadCallback: () => {
|
||||
tableStore.table.height = `calc(${prop.height} - 80px)`
|
||||
// 数据加载完成后的处理
|
||||
if (tableStore.table.data && tableStore.table.data.length > 0) {
|
||||
if (tableStore.table.data) {
|
||||
chartsList.value = JSON.parse(JSON.stringify(tableStore.table.data))
|
||||
setEchart()
|
||||
} else if (tableStore.table.data) {
|
||||
showEchart.value = false
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -58,7 +58,7 @@ const loop50 = (key: string) => {
|
||||
return list
|
||||
}
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/harmonic-boot/totalLimitStatistics/details',
|
||||
url: '/cs-harmonic-boot/totalLimitStatistics/details',
|
||||
method: 'POST',
|
||||
publicHeight: 30,
|
||||
showPage: false,
|
||||
|
||||
@@ -58,7 +58,7 @@ const loop50 = (key: string) => {
|
||||
return list
|
||||
}
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/harmonic-boot/totalLimitStatistics/details',
|
||||
url: '/cs-harmonic-boot/totalLimitStatistics/details',
|
||||
method: 'POST',
|
||||
publicHeight: 30,
|
||||
showPage: false,
|
||||
|
||||
@@ -120,7 +120,7 @@ const initEcharts = () => {
|
||||
|
||||
const OverLimitDetailsRef = ref()
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/harmonic-boot/totalLimitStatistics/list',
|
||||
url: '/cs-harmonic-boot/totalLimitStatistics/list',
|
||||
method: 'POST',
|
||||
|
||||
showPage: false,
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 暂态事件列表 -->
|
||||
<el-dialog draggable title="暂态事件列表" v-model="dialogVisible" append-to-body width="70%">
|
||||
<!-- <TableHeader datePicker showExport :showReset="false">
|
||||
<!-- 暂态事件详情 -->
|
||||
<el-dialog draggable title="暂态事件详情 " v-model="dialogVisible" append-to-body width="70%">
|
||||
<TableHeader datePicker showExport :showReset="false" ref="tableHeaderRef" @selectChange="selectChange">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="监测点名称">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
placeholder="请选择监测点名称"
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-form-item label="监测点">
|
||||
<el-select v-model="tableStore.table.params.lineId" placeholder="请选择监测点名称">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
@@ -19,8 +15,25 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader> -->
|
||||
<Table ref="tableRef" isGroup :height="height"></Table>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" isGroup :height="heightRef"></Table>
|
||||
</el-dialog>
|
||||
<!-- 查看波形 -->
|
||||
<el-dialog
|
||||
v-model="isWaveCharts"
|
||||
draggable
|
||||
title="波形分析"
|
||||
append-to-body
|
||||
v-if="isWaveCharts"
|
||||
width="70%"
|
||||
@close="handleHideCharts"
|
||||
>
|
||||
<waveFormAnalysis
|
||||
v-loading="loading"
|
||||
ref="waveFormAnalysisRef"
|
||||
@handleHideCharts="handleHideCharts"
|
||||
:wp="wp"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -30,21 +43,36 @@ import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue'
|
||||
import { analyseWave } from '@/api/common'
|
||||
import { getSimpleLine } from '@/api/harmonic-boot/cockpit/cockpit'
|
||||
|
||||
const dialogVisible: any = ref(false)
|
||||
const harmonicRatioRef: any = ref(null)
|
||||
const options = [
|
||||
{
|
||||
value: '35kV进线',
|
||||
label: '35kV进线'
|
||||
}
|
||||
]
|
||||
const height = mainHeight(0, 2).height as any
|
||||
const waveFormAnalysisRef: any = ref(null)
|
||||
// 波形
|
||||
const isWaveCharts = ref(false)
|
||||
const loading = ref(false)
|
||||
const wp = ref({})
|
||||
const boxoList: any = ref({})
|
||||
|
||||
const tableHeaderRef = ref()
|
||||
|
||||
const options = ref()
|
||||
const heightRef = ref(mainHeight(168, 2.1).height)
|
||||
const selectChange = (flag: boolean, h: any) => {
|
||||
heightRef.value = mainHeight(h, 2.1).height
|
||||
}
|
||||
|
||||
const getSimpleLineList = async () => {
|
||||
const res = await getSimpleLine()
|
||||
options.value = res.data
|
||||
}
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/user-boot/role/selectRoleDetail?id=0',
|
||||
url: '/cs-harmonic-boot/event/pageEvent',
|
||||
method: 'POST',
|
||||
publicHeight: 30,
|
||||
showPage: false,
|
||||
exportName: '主要监测点列表',
|
||||
showPage: true,
|
||||
exportName: '暂态事件详情',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
@@ -56,76 +84,142 @@ const tableStore: any = new TableStore({
|
||||
},
|
||||
{
|
||||
title: '暂态时间',
|
||||
field: 'time',
|
||||
field: 'startTime',
|
||||
minWidth: '180'
|
||||
},
|
||||
{
|
||||
title: '测点名称',
|
||||
field: 'name',
|
||||
width: '150'
|
||||
field: 'lineName',
|
||||
minWidth: '150'
|
||||
},
|
||||
{
|
||||
title: '暂态类型',
|
||||
field: 'flicker',
|
||||
width: '100',
|
||||
field: 'tag',
|
||||
minWidth: '100'
|
||||
},
|
||||
{
|
||||
title: '特征幅值(%)',
|
||||
field: 'flicker',
|
||||
width: '100'
|
||||
field: 'amplitude',
|
||||
minWidth: '100'
|
||||
},
|
||||
{
|
||||
title: '暂降深度(%)',
|
||||
field: 'flicker',
|
||||
width: '100'
|
||||
field: 'depth',
|
||||
minWidth: '100',
|
||||
formatter: (row: any) => {
|
||||
// 当暂态类型不是电压暂升时,计算暂降深度 = 100 - 特征幅值
|
||||
if (row.row.tag !== '电压暂升') {
|
||||
const amplitude = parseFloat(row.row.amplitude)
|
||||
if (!isNaN(amplitude)) {
|
||||
return 100 - amplitude
|
||||
}
|
||||
return '-'
|
||||
} else {
|
||||
// 电压暂升时不显示暂降深度
|
||||
return '/'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '持续时间(S)',
|
||||
field: 'flicker',
|
||||
width: '100'
|
||||
field: 'persistTime',
|
||||
minWidth: '100'
|
||||
},
|
||||
{
|
||||
{
|
||||
title: '严重度',
|
||||
field: 'flicker',
|
||||
width: '80'
|
||||
field: 'severity',
|
||||
minWidth: '80'
|
||||
},
|
||||
{
|
||||
title: '波形',
|
||||
width: '100',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
text: '波形分析',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-DataLine',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.wavePath
|
||||
},
|
||||
|
||||
click: async row => {
|
||||
row.loading1 = true
|
||||
loading.value = true
|
||||
isWaveCharts.value = true
|
||||
dialogVisible.value = false
|
||||
// 在打开弹窗时立即设置高度
|
||||
nextTick(() => {
|
||||
if (waveFormAnalysisRef.value) {
|
||||
// waveFormAnalysisRef.value.setHeight(false, 360)
|
||||
waveFormAnalysisRef.value.setHeight(999, 130, 1.6666666)
|
||||
}
|
||||
})
|
||||
await analyseWave(row.id)
|
||||
.then(res => {
|
||||
row.loading1 = false
|
||||
if (res != undefined) {
|
||||
boxoList.value = row
|
||||
// boxoList.value = {
|
||||
// ...row,
|
||||
// duration: row.persistTime // 将 persistTime 值赋给 duration
|
||||
// }
|
||||
boxoList.value.featureAmplitude =
|
||||
row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth - 0 : null
|
||||
boxoList.value.systemType = 'YPT'
|
||||
wp.value = res.data
|
||||
}
|
||||
loading.value = false
|
||||
})
|
||||
.catch(() => {
|
||||
row.loading1 = false
|
||||
loading.value = false
|
||||
})
|
||||
|
||||
nextTick(() => {
|
||||
waveFormAnalysisRef.value &&
|
||||
waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value, true)
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
text: '暂无波形',
|
||||
type: 'info',
|
||||
icon: 'el-icon-DataLine',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !!row.wavePath
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {},
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = [
|
||||
{
|
||||
time: '2024-01-01 00:00:00',
|
||||
name: '35kV进线',
|
||||
flicker: '0'
|
||||
},
|
||||
{
|
||||
time: '2024-01-01 00:00:00',
|
||||
name: '35kV进线',
|
||||
flicker: '0'
|
||||
},
|
||||
{
|
||||
time: '2024-01-01 00:00:00',
|
||||
name: '35kV进线',
|
||||
flicker: '0'
|
||||
}
|
||||
]
|
||||
}
|
||||
loadCallback: () => {}
|
||||
})
|
||||
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
const open = async (row: any) => {
|
||||
const open = async (time: any) => {
|
||||
dialogVisible.value = true
|
||||
tableStore.index()
|
||||
getSimpleLineList()
|
||||
tableStore.table.params.lineId = ''
|
||||
nextTick(() => {
|
||||
tableHeaderRef.value.setInterval(5)
|
||||
tableHeaderRef.value.setTimeInterval([time, time])
|
||||
tableStore.table.params.searchBeginTime = time
|
||||
tableStore.table.params.searchEndTime = time
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
|
||||
// 点击行
|
||||
const cellClickEvent = ({ row, column }: any) => {
|
||||
if (column.field != 'name') {
|
||||
harmonicRatioRef.value.openDialog(row)
|
||||
}
|
||||
const handleHideCharts = () => {
|
||||
isWaveCharts.value = false
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
@selectChange="selectChange"
|
||||
datePicker
|
||||
v-if="fullscreen"
|
||||
:timeCacheFlag="false"
|
||||
></TableHeader>
|
||||
<el-calendar
|
||||
v-model="value"
|
||||
@@ -14,9 +15,16 @@
|
||||
height: `calc(${prop.height} - ${headerHeight}px + ${fullscreen ? 0 : 56}px )`,
|
||||
overflow: 'auto'
|
||||
}"
|
||||
v-loading="tableStore.table.loading"
|
||||
>
|
||||
<template #date-cell="{ data }">
|
||||
<div style="height: 100%; padding: 8px" :style="{ background: setBackground(data.day) }">
|
||||
<div
|
||||
style="padding: 8px"
|
||||
:style="{
|
||||
background: setBackground(data.day),
|
||||
height: `calc((${prop.height} - 100px - ${headerHeight}px + ${fullscreen ? 0 : 56}px) / 5 )`
|
||||
}"
|
||||
>
|
||||
<p :class="data.isSelected ? 'is-selected' : ''">
|
||||
{{ data.day.split('-').slice(2).join('-') }}
|
||||
</p>
|
||||
@@ -31,10 +39,11 @@
|
||||
</template>
|
||||
<div
|
||||
style="text-decoration: underline"
|
||||
:style="{ height: `calc(${prop.height} / 5 - 40px)`, overflow: 'auto' }"
|
||||
class="details"
|
||||
v-for="item in list?.filter((item:any) => item.name == data.day)"
|
||||
@click="descentClick(item)"
|
||||
>
|
||||
<div @click="descentClick">电压暂降:{{ item.eventDown || 0 }}</div>
|
||||
<div>电压暂降:{{ item.eventDown || 0 }}</div>
|
||||
<div>电压中断:{{ item.eventOff || 0 }}</div>
|
||||
<div>电压暂升:{{ item.eventUp || 0 }}</div>
|
||||
</div>
|
||||
@@ -49,12 +58,9 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, reactive, watch, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { getTimeOfTheMonth } from '@/utils/formatTime'
|
||||
import { dayjs } from 'element-plus'
|
||||
import TransientList from './components/transientList.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useTimeCacheStore } from '@/stores/timeCache'
|
||||
|
||||
const prop = defineProps({
|
||||
w: { type: [String, Number] },
|
||||
@@ -79,11 +85,11 @@ const hasEventData = (day: string) => {
|
||||
const selectChange = (showSelect: any, height: any, datePickerValue?: any) => {
|
||||
headerHeight.value = height
|
||||
|
||||
// if (datePickerValue && datePickerValue.timeValue) {
|
||||
// // 更新时间参数
|
||||
// tableStore.table.params.searchBeginTime = datePickerValue.timeValue[0]
|
||||
// tableStore.table.params.searchEndTime = datePickerValue.timeValue[1]
|
||||
// }
|
||||
if (datePickerValue && datePickerValue.timeValue) {
|
||||
// 更新时间参数
|
||||
tableStore.table.params.searchBeginTime = datePickerValue.timeValue[0]
|
||||
tableStore.table.params.searchEndTime = datePickerValue.timeValue[1]
|
||||
}
|
||||
}
|
||||
|
||||
// 计算是否全屏展示
|
||||
@@ -113,13 +119,14 @@ const tableStore: any = new TableStore({
|
||||
column: [],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
if (prop.timeValue && Array.isArray(prop.timeValue)) {
|
||||
if (!fullscreen.value && prop.timeValue && Array.isArray(prop.timeValue)) {
|
||||
tableStore.table.params.searchBeginTime = prop.timeValue[0]
|
||||
tableStore.table.params.searchEndTime = prop.timeValue[1]
|
||||
}
|
||||
},
|
||||
|
||||
loadCallback: () => {
|
||||
value.value = tableStore.table.params.searchBeginTime
|
||||
list.value = tableStore.table.data
|
||||
}
|
||||
})
|
||||
@@ -176,26 +183,31 @@ watch(
|
||||
)
|
||||
|
||||
// 电压暂降点击事件
|
||||
const descentClick = () => {
|
||||
transientListRef.value.open()
|
||||
const descentClick = (item:any) => {
|
||||
transientListRef.value.open(item.name)
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-calendar) {
|
||||
.el-calendar__header {
|
||||
.el-calendar__button-group {
|
||||
display: none;
|
||||
}
|
||||
.el-calendar__body {
|
||||
padding: 0px !important;
|
||||
height: 100%;
|
||||
height: calc(100% - 46px);
|
||||
.el-calendar-table {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.el-calendar-day {
|
||||
// height: calc(912px / 5 );
|
||||
height: 100%;
|
||||
padding: 0px;
|
||||
overflow: hidden;
|
||||
.details {
|
||||
height: calc(100% - 20px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
.el-calendar-table__row {
|
||||
.next {
|
||||
|
||||
@@ -64,285 +64,143 @@ const config = useConfig()
|
||||
|
||||
const echartList = ref({})
|
||||
|
||||
// const echartList = ref({
|
||||
// options: {
|
||||
// xAxis: null,
|
||||
// yAxis: null,
|
||||
// dataZoom: null,
|
||||
// backgroundColor: '#fff',
|
||||
// tooltip: {
|
||||
// // trigger: 'axis'
|
||||
// textStyle: {
|
||||
// color: '#fff',
|
||||
// fontStyle: 'normal',
|
||||
// opacity: 0.35,
|
||||
// fontSize: 14
|
||||
// },
|
||||
// backgroundColor: 'rgba(0,0,0,0.55)',
|
||||
// borderWidth: 0,
|
||||
// formatter: function (params: any) {
|
||||
// console.log(params)
|
||||
// var tips = ''
|
||||
// for (var i = 0; i < params.length; i++) {
|
||||
// tips += params[i].name + '</br/>'
|
||||
// tips += '监测点数' + ':' + ' ' + ' ' + params[i].value + '</br/>'
|
||||
// }
|
||||
// return tips
|
||||
// }
|
||||
// },
|
||||
// title: {
|
||||
// text: '暂态事件概率分布',
|
||||
// x: 'center'
|
||||
// },
|
||||
const echartList1 = ref({})
|
||||
|
||||
// visualMap: {
|
||||
// max: 20,
|
||||
// show: false,
|
||||
// inRange: {
|
||||
// color: ['#313695', '#00BB00', '#ff8000', '#a50026']
|
||||
// const echartList1 = ref({
|
||||
// title: {
|
||||
// text: '越限时间概率分布'
|
||||
// },
|
||||
|
||||
// xAxis: {
|
||||
// // name: '时间',
|
||||
// // data: ['闪变', '谐波电压', '谐波电流', '电压偏差', '三相不平衡']
|
||||
// type: 'time',
|
||||
// axisLabel: {
|
||||
// formatter: {
|
||||
// day: '{MM}-{dd}',
|
||||
// month: '{MM}',
|
||||
// year: '{yyyy}'
|
||||
// }
|
||||
// },
|
||||
// xAxis3D: {
|
||||
// type: 'category',
|
||||
// name: '特征幅值',
|
||||
// data: [
|
||||
// '0-10%',
|
||||
// '10%-20%',
|
||||
// '20%-30%',
|
||||
// '30%-40%',
|
||||
// '40%-50%',
|
||||
// '50%-60%',
|
||||
// '60%-70%',
|
||||
// '70%-80%',
|
||||
// '80%-90%',
|
||||
// '90%-100%'
|
||||
// ],
|
||||
// axisLine: {
|
||||
// lineStyle: {
|
||||
// color: '#111'
|
||||
// }
|
||||
// },
|
||||
// axisLabel: {
|
||||
// color: '#111'
|
||||
// }
|
||||
// },
|
||||
// yAxis3D: {
|
||||
// type: 'category',
|
||||
// name: '持续时间',
|
||||
// data: ['0-0.01s', '0.01s-0.1s', '0.1s-1s', '1s-10s', '10s'],
|
||||
// nameTextStyle: {
|
||||
// color: '#111'
|
||||
// },
|
||||
// axisLine: {
|
||||
// show: true,
|
||||
// lineStyle: {
|
||||
// color: '#111'
|
||||
// }
|
||||
// },
|
||||
// axisLabel: {
|
||||
// color: '#111'
|
||||
// },
|
||||
// splitLine: {
|
||||
// lineStyle: {
|
||||
// // 使用深浅的间隔色
|
||||
// color: ['#111'],
|
||||
// type: 'dashed',
|
||||
// opacity: 0.5
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// zAxis3D: {
|
||||
// type: 'value',
|
||||
// splitNumber: 10,
|
||||
// minInterval: 10,
|
||||
// name: '暂态事件次数'
|
||||
// },
|
||||
// grid3D: {
|
||||
// viewControl: {
|
||||
// projection: 'perspective',
|
||||
// distance: 250
|
||||
// },
|
||||
// boxWidth: 200,
|
||||
// boxDepth: 80,
|
||||
// light: {
|
||||
// main: {
|
||||
// intensity: 1.2
|
||||
// },
|
||||
// ambient: {
|
||||
// intensity: 0.3
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// }
|
||||
// },
|
||||
|
||||
// yAxis: {
|
||||
// name: '次' // 给X轴加单位
|
||||
// },
|
||||
// grid: {
|
||||
// left: '10px',
|
||||
// right: '20px'
|
||||
// },
|
||||
// options: {
|
||||
// series: [
|
||||
// {
|
||||
// type: 'bar3D',
|
||||
// type: 'line',
|
||||
// showSymbol: false,
|
||||
// // smooth: true,
|
||||
// name: '电压中断',
|
||||
// color: '#FF9100',
|
||||
// data: [
|
||||
// [0, 0, 1],
|
||||
// [0, 1, 1],
|
||||
// [0.2, 1]
|
||||
// ],
|
||||
// shading: 'realistic',
|
||||
// label: {
|
||||
// show: false,
|
||||
// textStyle: {
|
||||
// fontSize: 16,
|
||||
// borderWidth: 1
|
||||
// }
|
||||
// },
|
||||
|
||||
// itemStyle: {
|
||||
// opacity: 1
|
||||
// },
|
||||
// emphasis: {
|
||||
// label: {
|
||||
// textStyle: {
|
||||
// fontSize: 20,
|
||||
// color: '#900'
|
||||
// }
|
||||
// },
|
||||
// itemStyle: {
|
||||
// color: '#900'
|
||||
// }
|
||||
// }
|
||||
// ['2025-10-16 07:00:00', 10],
|
||||
// ['2025-10-16 07:15:00', 10],
|
||||
// ['2025-10-16 07:30:00', 10],
|
||||
// ['2025-10-16 07:45:00', 10],
|
||||
// ['2025-10-16 08:00:00', 30],
|
||||
// ['2025-10-16 08:15:00', 50],
|
||||
// ['2025-10-16 08:30:00', 60],
|
||||
// ['2025-10-16 08:45:00', 70],
|
||||
// ['2025-10-16 09:00:00', 100],
|
||||
// ['2025-10-16 09:15:00', 120],
|
||||
// ['2025-10-16 09:30:00', 130],
|
||||
// ['2025-10-16 09:45:00', 140],
|
||||
// ['2025-10-16 10:00:00', 160],
|
||||
// ['2025-10-16 10:15:00', 160],
|
||||
// ['2025-10-16 10:30:00', 130],
|
||||
// ['2025-10-16 10:45:00', 120],
|
||||
// ['2025-10-16 11:00:00', 140],
|
||||
// ['2025-10-16 11:15:00', 80],
|
||||
// ['2025-10-16 11:30:00', 70],
|
||||
// ['2025-10-16 11:45:00', 90],
|
||||
// ['2025-10-16 12:00:00', 60],
|
||||
// ['2025-10-16 12:15:00', 60],
|
||||
// ['2025-10-16 12:30:00', 60],
|
||||
// ['2025-10-16 12:45:00', 60]
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// type: 'line',
|
||||
// showSymbol: false,
|
||||
// // smooth: true,
|
||||
// color: '#FFBF00',
|
||||
// name: '电压暂降',
|
||||
// data: [
|
||||
// ['2025-10-16 07:00:00', 1],
|
||||
// ['2025-10-16 07:15:00', 1],
|
||||
// ['2025-10-16 07:30:00', 1],
|
||||
// ['2025-10-16 07:45:00', 1],
|
||||
// ['2025-10-16 08:00:00', 3],
|
||||
// ['2025-10-16 08:15:00', 5],
|
||||
// ['2025-10-16 08:30:00', 6],
|
||||
// ['2025-10-16 08:45:00', 7],
|
||||
// ['2025-10-16 09:00:00', 10],
|
||||
// ['2025-10-16 09:15:00', 12],
|
||||
// ['2025-10-16 09:30:00', 13],
|
||||
// ['2025-10-16 09:45:00', 14],
|
||||
// ['2025-10-16 10:00:00', 16],
|
||||
// ['2025-10-16 10:15:00', 16],
|
||||
// ['2025-10-16 10:30:00', 13],
|
||||
// ['2025-10-16 10:45:00', 12],
|
||||
// ['2025-10-16 11:00:00', 14],
|
||||
// ['2025-10-16 11:15:00', 8],
|
||||
// ['2025-10-16 11:30:00', 7],
|
||||
// ['2025-10-16 11:45:00', 9],
|
||||
// ['2025-10-16 12:00:00', 6],
|
||||
// ['2025-10-16 12:15:00', 6],
|
||||
// ['2025-10-16 12:30:00', 6],
|
||||
// ['2025-10-16 12:45:00', 6]
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// type: 'line',
|
||||
// showSymbol: false,
|
||||
// // smooth: true,
|
||||
// name: '电压暂升',
|
||||
// color: config.layout.elementUiPrimary[0],
|
||||
// data: [
|
||||
// ['2025-10-16 07:00:00', 19],
|
||||
// ['2025-10-16 07:15:00', 19],
|
||||
// ['2025-10-16 07:30:00', 19],
|
||||
// ['2025-10-16 07:45:00', 19],
|
||||
// ['2025-10-16 08:00:00', 39],
|
||||
// ['2025-10-16 08:15:00', 59],
|
||||
// ['2025-10-16 08:30:00', 69],
|
||||
// ['2025-10-16 08:45:00', 79],
|
||||
// ['2025-10-16 09:00:00', 109],
|
||||
// ['2025-10-16 09:15:00', 129],
|
||||
// ['2025-10-16 09:30:00', 139],
|
||||
// ['2025-10-16 09:45:00', 149],
|
||||
// ['2025-10-16 10:00:00', 169],
|
||||
// ['2025-10-16 10:15:00', 169],
|
||||
// ['2025-10-16 10:30:00', 139],
|
||||
// ['2025-10-16 10:45:00', 129],
|
||||
// ['2025-10-16 11:00:00', 149],
|
||||
// ['2025-10-16 11:15:00', 89],
|
||||
// ['2025-10-16 11:30:00', 79],
|
||||
// ['2025-10-16 11:45:00', 99],
|
||||
// ['2025-10-16 12:00:00', 69],
|
||||
// ['2025-10-16 12:15:00', 69],
|
||||
// ['2025-10-16 12:30:00', 69],
|
||||
// ['2025-10-16 12:45:00', 69]
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
// })
|
||||
const echartList1 = ref({
|
||||
title: {
|
||||
text: '越限时间概率分布'
|
||||
},
|
||||
|
||||
xAxis: {
|
||||
// name: '时间',
|
||||
// data: ['闪变', '谐波电压', '谐波电流', '电压偏差', '三相不平衡']
|
||||
type: 'time',
|
||||
axisLabel: {
|
||||
formatter: {
|
||||
day: '{MM}-{dd}',
|
||||
month: '{MM}',
|
||||
year: '{yyyy}'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
yAxis: {
|
||||
name: '次' // 给X轴加单位
|
||||
},
|
||||
grid: {
|
||||
left: '10px',
|
||||
right: '20px'
|
||||
},
|
||||
options: {
|
||||
series: [
|
||||
{
|
||||
type: 'line',
|
||||
showSymbol: false,
|
||||
// smooth: true,
|
||||
name: '电压中断',
|
||||
color: '#FF9100',
|
||||
data: [
|
||||
['2025-10-16 07:00:00', 10],
|
||||
['2025-10-16 07:15:00', 10],
|
||||
['2025-10-16 07:30:00', 10],
|
||||
['2025-10-16 07:45:00', 10],
|
||||
['2025-10-16 08:00:00', 30],
|
||||
['2025-10-16 08:15:00', 50],
|
||||
['2025-10-16 08:30:00', 60],
|
||||
['2025-10-16 08:45:00', 70],
|
||||
['2025-10-16 09:00:00', 100],
|
||||
['2025-10-16 09:15:00', 120],
|
||||
['2025-10-16 09:30:00', 130],
|
||||
['2025-10-16 09:45:00', 140],
|
||||
['2025-10-16 10:00:00', 160],
|
||||
['2025-10-16 10:15:00', 160],
|
||||
['2025-10-16 10:30:00', 130],
|
||||
['2025-10-16 10:45:00', 120],
|
||||
['2025-10-16 11:00:00', 140],
|
||||
['2025-10-16 11:15:00', 80],
|
||||
['2025-10-16 11:30:00', 70],
|
||||
['2025-10-16 11:45:00', 90],
|
||||
['2025-10-16 12:00:00', 60],
|
||||
['2025-10-16 12:15:00', 60],
|
||||
['2025-10-16 12:30:00', 60],
|
||||
['2025-10-16 12:45:00', 60]
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'line',
|
||||
showSymbol: false,
|
||||
// smooth: true,
|
||||
color: '#FFBF00',
|
||||
name: '电压暂降',
|
||||
data: [
|
||||
['2025-10-16 07:00:00', 1],
|
||||
['2025-10-16 07:15:00', 1],
|
||||
['2025-10-16 07:30:00', 1],
|
||||
['2025-10-16 07:45:00', 1],
|
||||
['2025-10-16 08:00:00', 3],
|
||||
['2025-10-16 08:15:00', 5],
|
||||
['2025-10-16 08:30:00', 6],
|
||||
['2025-10-16 08:45:00', 7],
|
||||
['2025-10-16 09:00:00', 10],
|
||||
['2025-10-16 09:15:00', 12],
|
||||
['2025-10-16 09:30:00', 13],
|
||||
['2025-10-16 09:45:00', 14],
|
||||
['2025-10-16 10:00:00', 16],
|
||||
['2025-10-16 10:15:00', 16],
|
||||
['2025-10-16 10:30:00', 13],
|
||||
['2025-10-16 10:45:00', 12],
|
||||
['2025-10-16 11:00:00', 14],
|
||||
['2025-10-16 11:15:00', 8],
|
||||
['2025-10-16 11:30:00', 7],
|
||||
['2025-10-16 11:45:00', 9],
|
||||
['2025-10-16 12:00:00', 6],
|
||||
['2025-10-16 12:15:00', 6],
|
||||
['2025-10-16 12:30:00', 6],
|
||||
['2025-10-16 12:45:00', 6]
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'line',
|
||||
showSymbol: false,
|
||||
// smooth: true,
|
||||
name: '电压暂升',
|
||||
color: config.layout.elementUiPrimary[0],
|
||||
data: [
|
||||
['2025-10-16 07:00:00', 19],
|
||||
['2025-10-16 07:15:00', 19],
|
||||
['2025-10-16 07:30:00', 19],
|
||||
['2025-10-16 07:45:00', 19],
|
||||
['2025-10-16 08:00:00', 39],
|
||||
['2025-10-16 08:15:00', 59],
|
||||
['2025-10-16 08:30:00', 69],
|
||||
['2025-10-16 08:45:00', 79],
|
||||
['2025-10-16 09:00:00', 109],
|
||||
['2025-10-16 09:15:00', 129],
|
||||
['2025-10-16 09:30:00', 139],
|
||||
['2025-10-16 09:45:00', 149],
|
||||
['2025-10-16 10:00:00', 169],
|
||||
['2025-10-16 10:15:00', 169],
|
||||
['2025-10-16 10:30:00', 139],
|
||||
['2025-10-16 10:45:00', 129],
|
||||
['2025-10-16 11:00:00', 149],
|
||||
['2025-10-16 11:15:00', 89],
|
||||
['2025-10-16 11:30:00', 79],
|
||||
['2025-10-16 11:45:00', 99],
|
||||
['2025-10-16 12:00:00', 69],
|
||||
['2025-10-16 12:15:00', 69],
|
||||
['2025-10-16 12:30:00', 69],
|
||||
['2025-10-16 12:45:00', 69]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
const processDataForChart = (rawData: any[]) => {
|
||||
// 将后端返回的扁平数据转换为 ECharts 需要的三维坐标格式 [x, y, z]
|
||||
const chartData = rawData.map(item => [item.x, item.y, item.z]);
|
||||
|
||||
return chartData;
|
||||
};
|
||||
// 将后端返回的扁平数据转换为 ECharts 需要的三维坐标格式 [x, y, z]
|
||||
const chartData = rawData.map(item => [item.x, item.y, item.z])
|
||||
|
||||
return chartData
|
||||
}
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/cs-harmonic-boot/csevent/getEventCoords',
|
||||
@@ -354,8 +212,58 @@ const tableStore: any = new TableStore({
|
||||
tableStore.table.params.searchEndTime = tableStore.table.params.searchEndTime || prop.timeValue?.[1]
|
||||
},
|
||||
loadCallback: () => {
|
||||
const processedData = processDataForChart(tableStore.table.data || []);
|
||||
|
||||
const processedData = processDataForChart(tableStore.table.data.innerList || [])
|
||||
const trendList = tableStore.table.data.trendList || []
|
||||
const xlist = tableStore.table.data.xlist || []
|
||||
|
||||
// 处理趋势图数据
|
||||
const seriesData = trendList.map((item: any) => {
|
||||
// 根据接口返回的name字段确定系列名称和颜色
|
||||
let name = ''
|
||||
let color = ''
|
||||
|
||||
switch (item.name) {
|
||||
case 'Evt_Sys_DipStr':
|
||||
name = '电压暂降'
|
||||
color = '#FFBF00'
|
||||
break
|
||||
case 'Evt_Sys_IntrStr':
|
||||
name = '电压中断'
|
||||
color = '#FF9100'
|
||||
break
|
||||
case 'Evt_Sys_SwlStr':
|
||||
name = '电压暂升'
|
||||
color = config.layout.elementUiPrimary[0]
|
||||
break
|
||||
default:
|
||||
name = item.name
|
||||
color = '#000000'
|
||||
}
|
||||
|
||||
return {
|
||||
name: name,
|
||||
type: 'line',
|
||||
showSymbol: false,
|
||||
color: color,
|
||||
data: item.trendList?.map((value: number, index: number) => [xlist[index], value]) || []
|
||||
}
|
||||
})
|
||||
|
||||
// 获取x轴和y轴的标签值
|
||||
const xLabels = [
|
||||
'0-10%',
|
||||
'10%-20%',
|
||||
'20%-30%',
|
||||
'30%-40%',
|
||||
'40%-50%',
|
||||
'50%-60%',
|
||||
'60%-70%',
|
||||
'70%-80%',
|
||||
'80%-90%',
|
||||
'90%-100%'
|
||||
]
|
||||
const yLabels = ['0-0.01s', '0.01s-0.1s', '0.1s-1s', '1s-10s', '10s']
|
||||
|
||||
echartList.value = {
|
||||
options: {
|
||||
xAxis: null,
|
||||
@@ -372,20 +280,19 @@ const tableStore: any = new TableStore({
|
||||
backgroundColor: 'rgba(0,0,0,0.55)',
|
||||
borderWidth: 0,
|
||||
formatter: function (params: any) {
|
||||
console.log(params,'333455')
|
||||
var tips = ''
|
||||
tips += '持续时间: ' + params.value[1] + '</br>'
|
||||
tips += '特征幅值: ' + params.seriesName + '</br>'
|
||||
tips += '事件次数: ' + params.value[2] + '</br>'
|
||||
return tips
|
||||
}
|
||||
var tips = ''
|
||||
tips += '持续时间: ' + yLabels[params.value[1]] + '</br>'
|
||||
tips += '特征幅值: ' + xLabels[params.value[0]] + '</br>'
|
||||
tips += '事件次数: ' + params.value[2] + '</br>'
|
||||
return tips
|
||||
}
|
||||
},
|
||||
title: {
|
||||
text: '暂态事件概率分布',
|
||||
x: 'center'
|
||||
},
|
||||
visualMap: {
|
||||
max: 500, // 根据实际数据调整最大值
|
||||
max: 500,
|
||||
show: false,
|
||||
inRange: {
|
||||
color: ['#313695', '#00BB00', '#ff8000', '#a50026']
|
||||
@@ -394,18 +301,7 @@ const tableStore: any = new TableStore({
|
||||
xAxis3D: {
|
||||
type: 'category',
|
||||
name: '特征幅值',
|
||||
data: [
|
||||
'0-10%',
|
||||
'10%-20%',
|
||||
'20%-30%',
|
||||
'30%-40%',
|
||||
'40%-50%',
|
||||
'50%-60%',
|
||||
'60%-70%',
|
||||
'70%-80%',
|
||||
'80%-90%',
|
||||
'90%-100%'
|
||||
],
|
||||
data: xLabels,
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#111'
|
||||
@@ -418,7 +314,7 @@ const tableStore: any = new TableStore({
|
||||
yAxis3D: {
|
||||
type: 'category',
|
||||
name: '持续时间',
|
||||
data: ['0-0.01s', '0.01s-0.1s', '0.1s-1s', '1s-10s', '10s'],
|
||||
data: yLabels,
|
||||
nameTextStyle: {
|
||||
color: '#111'
|
||||
},
|
||||
@@ -464,7 +360,7 @@ const tableStore: any = new TableStore({
|
||||
series: [
|
||||
{
|
||||
type: 'bar3D',
|
||||
data: processedData, // 使用处理后的数据
|
||||
data: processedData,
|
||||
shading: 'realistic',
|
||||
label: {
|
||||
show: false,
|
||||
@@ -491,6 +387,27 @@ const tableStore: any = new TableStore({
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
echartList1.value = {
|
||||
title: {
|
||||
text: '越限时间概率分布'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: xlist,
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
name: '次'
|
||||
},
|
||||
grid: {
|
||||
left: '10px',
|
||||
right: '20px'
|
||||
},
|
||||
series: seriesData
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -2,14 +2,10 @@
|
||||
<div>
|
||||
<!-- 暂态事件详情 -->
|
||||
<el-dialog draggable title="暂态事件详情 " v-model="dialogVisible" append-to-body width="70%">
|
||||
<TableHeader datePicker showExport :showReset="false">
|
||||
<TableHeader datePicker showExport :showReset="false" ref="tableHeaderRef" @selectChange="selectChange">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="监测点名称">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
placeholder="请选择监测点名称"
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-form-item label="监测点">
|
||||
<el-select v-model="tableStore.table.params.lineId" placeholder="请选择监测点名称">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
@@ -20,15 +16,22 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" @cell-click="cellClickEvent" isGroup :height="height"></Table>
|
||||
<Table ref="tableRef" isGroup :height="heightRef"></Table>
|
||||
</el-dialog>
|
||||
<!-- 查看波形 -->
|
||||
<el-dialog v-model="isWaveCharts" draggable title="瞬时/RMS波形" append-to-body width="70%">
|
||||
<el-dialog
|
||||
v-model="isWaveCharts"
|
||||
draggable
|
||||
title="波形分析"
|
||||
append-to-body
|
||||
width="70%"
|
||||
@close="handleHideCharts"
|
||||
>
|
||||
<waveFormAnalysis
|
||||
v-loading="loading"
|
||||
v-if="isWaveCharts"
|
||||
ref="waveFormAnalysisRef"
|
||||
@handleHideCharts="isWaveCharts = false"
|
||||
@handleHideCharts="handleHideCharts"
|
||||
:wp="wp"
|
||||
/>
|
||||
</el-dialog>
|
||||
@@ -42,6 +45,8 @@ import TableStore from '@/utils/tableStore'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue'
|
||||
import { analyseWave } from '@/api/common'
|
||||
import { getSimpleLine } from '@/api/harmonic-boot/cockpit/cockpit'
|
||||
|
||||
const dialogVisible: any = ref(false)
|
||||
const waveFormAnalysisRef: any = ref(null)
|
||||
// 波形
|
||||
@@ -50,18 +55,24 @@ const loading = ref(false)
|
||||
const wp = ref({})
|
||||
const boxoList: any = ref({})
|
||||
|
||||
const options = [
|
||||
{
|
||||
value: '35kV进线',
|
||||
label: '35kV进线'
|
||||
}
|
||||
]
|
||||
const height = mainHeight(0, 2).height as any
|
||||
const tableHeaderRef = ref()
|
||||
|
||||
const options = ref()
|
||||
const heightRef = ref(mainHeight(168, 2.1).height)
|
||||
const selectChange = (flag: boolean, h: any) => {
|
||||
heightRef.value = mainHeight(h, 2.1).height
|
||||
}
|
||||
|
||||
const getSimpleLineList = async () => {
|
||||
const res = await getSimpleLine()
|
||||
options.value = res.data
|
||||
}
|
||||
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/user-boot/role/selectRoleDetail?id=0',
|
||||
url: '/cs-harmonic-boot/event/pageEvent',
|
||||
method: 'POST',
|
||||
publicHeight: 30,
|
||||
showPage: false,
|
||||
showPage: true,
|
||||
exportName: '主要监测点列表',
|
||||
column: [
|
||||
{
|
||||
@@ -74,36 +85,50 @@ const tableStore: any = new TableStore({
|
||||
},
|
||||
{
|
||||
title: '暂态时间',
|
||||
field: 'time'
|
||||
field: 'startTime',
|
||||
minWidth: '150'
|
||||
},
|
||||
{
|
||||
title: '测点名称',
|
||||
field: 'name',
|
||||
field: 'lineName',
|
||||
width: '150'
|
||||
},
|
||||
{
|
||||
title: '暂态类型',
|
||||
field: 'flicker',
|
||||
field: 'tag',
|
||||
width: '100'
|
||||
},
|
||||
{
|
||||
title: '特征幅值(%)',
|
||||
field: 'flicker',
|
||||
field: 'amplitude',
|
||||
width: '100'
|
||||
},
|
||||
{
|
||||
title: '暂降深度(%)',
|
||||
field: 'flicker',
|
||||
width: '100'
|
||||
field: 'depth',
|
||||
width: '100',
|
||||
formatter: (row: any) => {
|
||||
// 当暂态类型不是电压暂升时,计算暂降深度 = 100 - 特征幅值
|
||||
if (row.row.tag !== '电压暂升') {
|
||||
const amplitude = parseFloat(row.row.amplitude)
|
||||
if (!isNaN(amplitude)) {
|
||||
return 100 - amplitude
|
||||
}
|
||||
return '-'
|
||||
} else {
|
||||
// 电压暂升时不显示暂降深度
|
||||
return '/'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '持续时间(S)',
|
||||
field: 'flicker',
|
||||
field: 'persistTime',
|
||||
width: '100'
|
||||
},
|
||||
{
|
||||
title: '严重度',
|
||||
field: 'flicker',
|
||||
field: 'severity',
|
||||
width: '80'
|
||||
},
|
||||
{
|
||||
@@ -112,27 +137,39 @@ const tableStore: any = new TableStore({
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'check',
|
||||
title: '查看波形',
|
||||
name: 'edit',
|
||||
text: '波形分析',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
icon: 'el-icon-DataLine',
|
||||
render: 'basicButton',
|
||||
loading: 'loading1',
|
||||
// disabled: row => {
|
||||
// return !row.wavePath
|
||||
// },
|
||||
disabled: row => {
|
||||
return !row.wavePath
|
||||
},
|
||||
|
||||
click: async row => {
|
||||
row.loading1 = true
|
||||
loading.value = true
|
||||
isWaveCharts.value = true
|
||||
dialogVisible.value = false
|
||||
// 在打开弹窗时立即设置高度
|
||||
nextTick(() => {
|
||||
if (waveFormAnalysisRef.value) {
|
||||
// waveFormAnalysisRef.value.setHeight(false, 360)
|
||||
waveFormAnalysisRef.value.setHeight(999, 130, 1.6666666)
|
||||
}
|
||||
})
|
||||
await analyseWave(row.id)
|
||||
.then(res => {
|
||||
row.loading1 = false
|
||||
if (res != undefined) {
|
||||
boxoList.value = row
|
||||
// boxoList.value = {
|
||||
// ...row,
|
||||
// duration: row.persistTime // 将 persistTime 值赋给 duration
|
||||
// }
|
||||
boxoList.value.featureAmplitude =
|
||||
row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth - 0 : null
|
||||
boxoList.value.systemType = 'WX'
|
||||
boxoList.value.systemType = 'YPT'
|
||||
wp.value = res.data
|
||||
}
|
||||
loading.value = false
|
||||
@@ -147,44 +184,40 @@ const tableStore: any = new TableStore({
|
||||
waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value, true)
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
text: '暂无波形',
|
||||
type: 'info',
|
||||
icon: 'el-icon-DataLine',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !(!row.wavePath && row.evtParamTm < 20)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {},
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = [
|
||||
{
|
||||
time: '2024-01-01 00:00:00',
|
||||
name: '35kV进线',
|
||||
flicker: '0'
|
||||
},
|
||||
{
|
||||
time: '2024-01-01 00:00:00',
|
||||
name: '35kV进线',
|
||||
flicker: '0'
|
||||
},
|
||||
{
|
||||
time: '2024-01-01 00:00:00',
|
||||
name: '35kV进线',
|
||||
flicker: '0'
|
||||
}
|
||||
]
|
||||
}
|
||||
loadCallback: () => {}
|
||||
})
|
||||
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
const open = async (row: any) => {
|
||||
const open = async (row: any, searchBeginTime: any, searchEndTime: any) => {
|
||||
dialogVisible.value = true
|
||||
tableStore.index()
|
||||
getSimpleLineList()
|
||||
tableStore.table.params.lineId = row.id
|
||||
nextTick(() => {
|
||||
tableHeaderRef.value.setTimeInterval([searchBeginTime, searchEndTime])
|
||||
tableStore.table.params.searchBeginTime = searchBeginTime
|
||||
tableStore.table.params.searchEndTime = searchEndTime
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
|
||||
// 点击行
|
||||
const cellClickEvent = ({ row, column }: any) => {
|
||||
if (column.field != 'name') {
|
||||
isWaveCharts.value = true
|
||||
}
|
||||
const handleHideCharts = () => {
|
||||
isWaveCharts.value = false
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
|
||||
@@ -24,12 +24,9 @@ import { ref, onMounted, provide, reactive, watch, h } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { getTimeOfTheMonth } from '@/utils/formatTime'
|
||||
import { useConfig } from '@/stores/config'
|
||||
import TransientStatisticsDetail from '@/components/cockpit/transientStatistics/components/transientStatisticsDetail.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useTimeCacheStore } from '@/stores/timeCache'
|
||||
import { netEventEcharts } from '@/api/harmonic-boot/cockpit/cockpit'
|
||||
|
||||
const prop = defineProps({
|
||||
@@ -76,7 +73,7 @@ const eventEcharts = () => {
|
||||
searchEndTime: tableStore.table.params.searchEndTime || prop.timeValue?.[1]
|
||||
}).then(res => {
|
||||
// 整理接口数据为图表所需格式
|
||||
const rawData = res.data || {};
|
||||
const rawData = res.data || {}
|
||||
data.value = [
|
||||
{
|
||||
name: '电压中断',
|
||||
@@ -90,8 +87,8 @@ const eventEcharts = () => {
|
||||
name: '电压暂升',
|
||||
value: rawData.eventUp || 0
|
||||
}
|
||||
];
|
||||
|
||||
]
|
||||
|
||||
echartList.value = {
|
||||
title: {},
|
||||
tooltip: {
|
||||
@@ -124,7 +121,7 @@ const eventEcharts = () => {
|
||||
left: 'center'
|
||||
},
|
||||
{
|
||||
text: (rawData.eventOff + rawData.eventDown + rawData.eventUp) + '次',
|
||||
text: rawData.eventOff + rawData.eventDown + rawData.eventUp + '次',
|
||||
left: 'center',
|
||||
top: 'center'
|
||||
}
|
||||
@@ -174,6 +171,7 @@ const tableStore: any = new TableStore({
|
||||
title: '电压中断(次)',
|
||||
field: 'eventOff',
|
||||
minWidth: '70',
|
||||
sortable: true,
|
||||
render: 'customTemplate',
|
||||
customTemplate: (row: any) => {
|
||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.eventOff}</span>`
|
||||
@@ -183,6 +181,7 @@ const tableStore: any = new TableStore({
|
||||
title: '电压暂降(次)',
|
||||
field: 'eventDown',
|
||||
minWidth: '80',
|
||||
sortable: true,
|
||||
render: 'customTemplate',
|
||||
customTemplate: (row: any) => {
|
||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.eventDown}</span>`
|
||||
@@ -192,6 +191,7 @@ const tableStore: any = new TableStore({
|
||||
title: '电压暂升(次)',
|
||||
field: 'eventUp',
|
||||
minWidth: '80',
|
||||
sortable: true,
|
||||
render: 'customTemplate',
|
||||
customTemplate: (row: any) => {
|
||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.eventUp}</span>`
|
||||
@@ -215,7 +215,11 @@ provide('tableStore', tableStore)
|
||||
// 点击行
|
||||
const cellClickEvent = ({ row, column }: any) => {
|
||||
if (column.field != 'name') {
|
||||
transientStatisticsDetailRef.value.open(row)
|
||||
transientStatisticsDetailRef.value.open(
|
||||
row,
|
||||
tableStore.table.params.searchBeginTime || prop.timeValue?.[0],
|
||||
tableStore.table.params.searchEndTime || prop.timeValue?.[1]
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,6 @@
|
||||
width: prop.width,
|
||||
height: `calc(${prop.height} - ${headerHeight}px + ${fullscreen ? 0 : 56}px)`
|
||||
}"
|
||||
v-if="showEchart"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -116,8 +115,6 @@ const indicatorList = ref()
|
||||
|
||||
const echartList = ref()
|
||||
|
||||
const showEchart = ref(true)
|
||||
|
||||
const headerHeight = ref(57)
|
||||
|
||||
// 监测对象
|
||||
@@ -209,13 +206,7 @@ const setEchart = () => {
|
||||
data: beforeGroupedByPhase[phase],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: function (params: any) {
|
||||
if (params.value[1] == 0 || params.value[1] == 3.14159) {
|
||||
return '#ccc'
|
||||
} else {
|
||||
return color
|
||||
}
|
||||
}
|
||||
color: color
|
||||
}
|
||||
},
|
||||
lineStyle: {
|
||||
@@ -240,13 +231,7 @@ const setEchart = () => {
|
||||
data: afterGroupedByPhase[phase],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: function (params: any) {
|
||||
if (params.value[1] == 0 || params.value[1] == 3.14159) {
|
||||
return '#ccc'
|
||||
} else {
|
||||
return color
|
||||
}
|
||||
}
|
||||
color:color
|
||||
}
|
||||
},
|
||||
lineStyle: {
|
||||
@@ -371,9 +356,7 @@ const tableStore: any = new TableStore({
|
||||
chartsListBefore.value = tableStore.table.data.before
|
||||
chartsListAfter.value = tableStore.table.data.after
|
||||
setEchart()
|
||||
} else if (tableStore.table.data) {
|
||||
showEchart.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -1,311 +1,318 @@
|
||||
// 辅助函数
|
||||
const getMax = (temp, tempA, tempB, tempC) => {
|
||||
temp = temp > tempA ? temp : tempA;
|
||||
temp = temp > tempB ? temp : tempB;
|
||||
if (tempC !== undefined) {
|
||||
temp = temp > tempC ? temp : tempC;
|
||||
}
|
||||
return temp;
|
||||
};
|
||||
temp = temp > tempA ? temp : tempA
|
||||
temp = temp > tempB ? temp : tempB
|
||||
if (tempC !== undefined) {
|
||||
temp = temp > tempC ? temp : tempC
|
||||
}
|
||||
return temp
|
||||
}
|
||||
|
||||
const getMaxTwo = (temp, tempA, tempB) => {
|
||||
temp = temp > tempA ? temp : tempA;
|
||||
temp = temp > tempB ? temp : tempB;
|
||||
return temp;
|
||||
};
|
||||
temp = temp > tempA ? temp : tempA
|
||||
temp = temp > tempB ? temp : tempB
|
||||
return temp
|
||||
}
|
||||
|
||||
const getMin = (temp, tempA, tempB, tempC) => {
|
||||
temp = temp < tempA ? temp : tempA;
|
||||
temp = temp < tempB ? temp : tempB;
|
||||
if (tempC !== undefined) {
|
||||
temp = temp < tempC ? temp : tempC;
|
||||
}
|
||||
return temp;
|
||||
};
|
||||
temp = temp < tempA ? temp : tempA
|
||||
temp = temp < tempB ? temp : tempB
|
||||
if (tempC !== undefined) {
|
||||
temp = temp < tempC ? temp : tempC
|
||||
}
|
||||
return temp
|
||||
}
|
||||
|
||||
const getMinOpen = (temp, tempA, tempB) => {
|
||||
temp = temp < tempA ? temp : tempA;
|
||||
temp = temp < tempB ? temp : tempB;
|
||||
return temp;
|
||||
};
|
||||
temp = temp < tempA ? temp : tempA
|
||||
temp = temp < tempB ? temp : tempB
|
||||
return temp
|
||||
}
|
||||
|
||||
// 数据处理函数
|
||||
const fliteWaveData = (wp, step, iphasicValue, isOpen) => {
|
||||
const rmsData = wp.listRmsData;
|
||||
const pt = Number(wp.pt) / 1000;
|
||||
const ct = Number(wp.ct);
|
||||
const titleList = wp.waveTitle;
|
||||
let xishu = pt;
|
||||
let aTitle = "",
|
||||
bTitle = "",
|
||||
cTitle = "",
|
||||
unit = "电压";
|
||||
let rmsvFirstX = 0,
|
||||
rmsvFirstY = 0,
|
||||
rmsvSecondX = 0,
|
||||
rmsvSecondY = 0,
|
||||
firstZhou = "a",
|
||||
secondeZhou = "a";
|
||||
let ifmax = 0,
|
||||
ifmin = 0,
|
||||
ismax = 0,
|
||||
ismin = 0,
|
||||
rfmax = 0,
|
||||
rfmin = 0,
|
||||
rsmax = 0,
|
||||
rsmin = 0;
|
||||
const rmsData = wp.listRmsData
|
||||
const pt = Number(wp.pt) / 1000
|
||||
const ct = Number(wp.ct)
|
||||
const titleList = wp.waveTitle
|
||||
let xishu = pt
|
||||
let aTitle = '',
|
||||
bTitle = '',
|
||||
cTitle = '',
|
||||
unit = '电压'
|
||||
let rmsvFirstX = 0,
|
||||
rmsvFirstY = 0,
|
||||
rmsvSecondX = 0,
|
||||
rmsvSecondY = 0,
|
||||
firstZhou = 'a',
|
||||
secondeZhou = 'a'
|
||||
let ifmax = 0,
|
||||
ifmin = 0,
|
||||
ismax = 0,
|
||||
ismin = 0,
|
||||
rfmax = 0,
|
||||
rfmin = 0,
|
||||
rsmax = 0,
|
||||
rsmin = 0
|
||||
|
||||
const shunshiFA = [];
|
||||
const shunshiFB = [];
|
||||
const shunshiFC = [];
|
||||
const shunshiSA = [];
|
||||
const shunshiSB = [];
|
||||
const shunshiSC = [];
|
||||
const rmsFA = [];
|
||||
const rmsFB = [];
|
||||
const rmsFC = [];
|
||||
const rmsSA = [];
|
||||
const rmsSB = [];
|
||||
const rmsSC = [];
|
||||
const shunshiFA = []
|
||||
const shunshiFB = []
|
||||
const shunshiFC = []
|
||||
const shunshiSA = []
|
||||
const shunshiSB = []
|
||||
const shunshiSC = []
|
||||
const rmsFA = []
|
||||
const rmsFB = []
|
||||
const rmsFC = []
|
||||
const rmsSA = []
|
||||
const rmsSB = []
|
||||
const rmsSC = []
|
||||
|
||||
|
||||
|
||||
if (titleList[iphasicValue * step + 1]?.substring(0, 1) !== "U") {
|
||||
xishu = ct;
|
||||
unit = "电流";
|
||||
}
|
||||
|
||||
for (let i = 1; i <= iphasicValue; i++) {
|
||||
switch (i) {
|
||||
case 1:
|
||||
aTitle = titleList[iphasicValue * step + i]?.substring(1) || "";
|
||||
break;
|
||||
case 2:
|
||||
bTitle = titleList[iphasicValue * step + i]?.substring(1) || "";
|
||||
break;
|
||||
case 3:
|
||||
cTitle = titleList[iphasicValue * step + i]?.substring(1) || "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (rmsData[0] && rmsData[0][iphasicValue * step + 1] !== undefined) {
|
||||
rfmax = rmsData[0][iphasicValue * step + 1] * xishu;
|
||||
rfmin = rmsData[0][iphasicValue * step + 1] * xishu;
|
||||
rmsvFirstY = rmsData[0][iphasicValue * step + 1] * xishu;
|
||||
rmsvFirstX = rmsData[0][0];
|
||||
rsmax = rmsData[0][iphasicValue * step + 1];
|
||||
rsmin = rmsData[0][iphasicValue * step + 1];
|
||||
rmsvSecondY = rmsData[0][iphasicValue * step + 1];
|
||||
rmsvSecondX = rmsData[0][0];
|
||||
}
|
||||
|
||||
for (let rms = 0; rms < rmsData.length; rms++) {
|
||||
if (!rmsData[rms] || rmsData[rms][iphasicValue * step + 1] === undefined) {
|
||||
break;
|
||||
if (titleList[iphasicValue * step + 1]?.substring(0, 1) !== 'U') {
|
||||
xishu = ct
|
||||
unit = '电流'
|
||||
}
|
||||
|
||||
switch (iphasicValue) {
|
||||
case 1:
|
||||
const rmsFirstA = rmsData[rms][iphasicValue * step + 1] * xishu;
|
||||
rmsFA.push([rmsData[rms][0], rmsFirstA]);
|
||||
rfmax = rfmax > rmsFirstA ? rfmax : rmsFirstA;
|
||||
rfmin = rfmin < rmsFirstA ? rfmin : rmsFirstA;
|
||||
if (rfmin < rmsvFirstY) {
|
||||
rmsvFirstY = rfmin;
|
||||
firstZhou = "a";
|
||||
rmsvFirstX = rmsData[rms][0];
|
||||
for (let i = 1; i <= iphasicValue; i++) {
|
||||
switch (i) {
|
||||
case 1:
|
||||
aTitle = titleList[iphasicValue * step + i]?.substring(1) || ''
|
||||
break
|
||||
case 2:
|
||||
bTitle = titleList[iphasicValue * step + i]?.substring(1) || ''
|
||||
break
|
||||
case 3:
|
||||
cTitle = titleList[iphasicValue * step + i]?.substring(1) || ''
|
||||
break
|
||||
}
|
||||
|
||||
const rmsSecondA = rmsData[rms][iphasicValue * step + 1];
|
||||
rmsSA.push([rmsData[rms][0], rmsSecondA]);
|
||||
rsmax = rsmax > rmsSecondA ? rsmax : rmsSecondA;
|
||||
rsmin = rsmin < rmsSecondA ? rsmin : rmsSecondA;
|
||||
if (rsmin < rmsvSecondY) {
|
||||
rmsvSecondY = rsmin;
|
||||
secondeZhou = "a";
|
||||
rmsvSecondX = rmsData[rms][0];
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
const rmsFirstA2 = rmsData[rms][iphasicValue * step + 1] * xishu;
|
||||
const rmsFirstB2 = rmsData[rms][iphasicValue * step + 2] * xishu;
|
||||
rmsFA.push([rmsData[rms][0], rmsFirstA2]);
|
||||
rmsFB.push([rmsData[rms][0], rmsFirstB2]);
|
||||
rfmax = getMaxTwo(rfmax, rmsFirstA2, rmsFirstB2);
|
||||
rfmin = getMinOpen(rfmin, rmsFirstA2, rmsFirstB2);
|
||||
if (rfmin < rmsvFirstY) {
|
||||
rmsvFirstY = rfmin;
|
||||
if (rfmin === rmsFirstA2) {
|
||||
firstZhou = "a";
|
||||
} else if (rfmin === rmsFirstB2) {
|
||||
firstZhou = "b";
|
||||
}
|
||||
rmsvFirstX = rmsData[rms][0];
|
||||
}
|
||||
|
||||
const rmsSecondA2 = rmsData[rms][iphasicValue * step + 1];
|
||||
const rmsSecondB2 = rmsData[rms][iphasicValue * step + 2];
|
||||
rmsSA.push([rmsData[rms][0], rmsSecondA2]);
|
||||
rmsSB.push([rmsData[rms][0], rmsSecondB2]);
|
||||
rsmax = getMaxTwo(rsmax, rmsSecondA2, rmsSecondB2);
|
||||
rsmin = getMinOpen(rsmin, rmsSecondA2, rmsSecondB2);
|
||||
if (rsmin < rmsvSecondY) {
|
||||
rmsvSecondY = rsmin;
|
||||
if (rsmin === rmsSecondA2) {
|
||||
secondeZhou = "a";
|
||||
} else if (rsmin === rmsSecondB2) {
|
||||
secondeZhou = "b";
|
||||
}
|
||||
rmsvSecondX = rmsData[rms][0];
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
const rmsFirstA3 = rmsData[rms][iphasicValue * step + 1] * xishu;
|
||||
const rmsFirstB3 = rmsData[rms][iphasicValue * step + 2] * xishu;
|
||||
const rmsFirstC3 = rmsData[rms][iphasicValue * step + 3] * xishu;
|
||||
rmsFA.push([rmsData[rms][0], rmsFirstA3]);
|
||||
rmsFB.push([rmsData[rms][0], rmsFirstB3]);
|
||||
rmsFC.push([rmsData[rms][0], rmsFirstC3]);
|
||||
rfmax = getMax(rfmax, rmsFirstA3, rmsFirstB3, rmsFirstC3);
|
||||
rfmin = isOpen
|
||||
? getMinOpen(rfmin, rmsFirstA3, rmsFirstC3)
|
||||
: getMin(rfmin, rmsFirstA3, rmsFirstB3, rmsFirstC3);
|
||||
if (rfmin < rmsvFirstY) {
|
||||
rmsvFirstY = rfmin;
|
||||
if (rfmin === rmsFirstA3) {
|
||||
firstZhou = "a";
|
||||
} else if (rfmin === rmsFirstB3) {
|
||||
firstZhou = "b";
|
||||
} else {
|
||||
firstZhou = "c";
|
||||
}
|
||||
rmsvFirstX = rmsData[rms][0];
|
||||
}
|
||||
|
||||
const rmsSecondA3 = rmsData[rms][iphasicValue * step + 1];
|
||||
const rmsSecondB3 = rmsData[rms][iphasicValue * step + 2];
|
||||
const rmsSecondC3 = rmsData[rms][iphasicValue * step + 3];
|
||||
rmsSA.push([rmsData[rms][0], rmsSecondA3]);
|
||||
rmsSB.push([rmsData[rms][0], rmsSecondB3]);
|
||||
rmsSC.push([rmsData[rms][0], rmsSecondC3]);
|
||||
rsmax = getMax(rsmax, rmsSecondA3, rmsSecondB3, rmsSecondC3);
|
||||
rsmin = isOpen
|
||||
? getMinOpen(rsmin, rmsSecondA3, rmsSecondC3)
|
||||
: getMin(rsmin, rmsSecondA3, rmsSecondB3, rmsSecondC3);
|
||||
if (rsmin < rmsvSecondY) {
|
||||
rmsvSecondY = rsmin;
|
||||
if (rsmin === rmsSecondA3) {
|
||||
secondeZhou = "a";
|
||||
} else if (rsmin === rmsSecondB3) {
|
||||
secondeZhou = "b";
|
||||
} else {
|
||||
secondeZhou = "c";
|
||||
}
|
||||
rmsvSecondX = rmsData[rms][0];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const instantF = { max: ifmax, min: ifmin };
|
||||
const instantS = { max: ismax, min: ismin };
|
||||
const RMSF = { max: rfmax, min: rfmin };
|
||||
const RMSS = { max: rsmax, min: rsmin };
|
||||
const RMSFMinDetail = { rmsvFirstX, rmsvFirstY, firstZhou };
|
||||
const RMSSMinDetail = { rmsvSecondX, rmsvSecondY, secondeZhou };
|
||||
const shunshiF = { shunshiFA, shunshiFB, shunshiFC };
|
||||
const shunshiS = { shunshiSA, shunshiSB, shunshiSC };
|
||||
const RMSFWave = { rmsFA, rmsFB, rmsFC };
|
||||
const RMSSWave = { rmsSA, rmsSB, rmsSC };
|
||||
const title = { aTitle, bTitle, cTitle, unit };
|
||||
if (rmsData[0] && rmsData[0][iphasicValue * step + 1] !== undefined) {
|
||||
rfmax = rmsData[0][iphasicValue * step + 1] * xishu
|
||||
rfmin = rmsData[0][iphasicValue * step + 1] * xishu
|
||||
rmsvFirstY = rmsData[0][iphasicValue * step + 1] * xishu
|
||||
rmsvFirstX = rmsData[0][0]
|
||||
rsmax = rmsData[0][iphasicValue * step + 1]
|
||||
rsmin = rmsData[0][iphasicValue * step + 1]
|
||||
rmsvSecondY = rmsData[0][iphasicValue * step + 1]
|
||||
rmsvSecondX = rmsData[0][0]
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
|
||||
instantF,
|
||||
instantS,
|
||||
RMSF,
|
||||
RMSS,
|
||||
RMSFMinDetail,
|
||||
RMSSMinDetail,
|
||||
shunshiF,
|
||||
shunshiS,
|
||||
RMSFWave,
|
||||
RMSSWave,
|
||||
title,
|
||||
unit,
|
||||
};
|
||||
};
|
||||
for (let rms = 0; rms < rmsData.length; rms++) {
|
||||
if (!rmsData[rms] || rmsData[rms][iphasicValue * step + 1] === undefined) {
|
||||
break
|
||||
}
|
||||
|
||||
switch (iphasicValue) {
|
||||
case 1:
|
||||
const rmsFirstA = rmsData[rms][iphasicValue * step + 1] * xishu
|
||||
rmsFA.push([rmsData[rms][0], rmsFirstA])
|
||||
rfmax = rfmax > rmsFirstA ? rfmax : rmsFirstA
|
||||
rfmin = rfmin < rmsFirstA ? rfmin : rmsFirstA
|
||||
if (rfmin < rmsvFirstY) {
|
||||
rmsvFirstY = rfmin
|
||||
firstZhou = 'a'
|
||||
rmsvFirstX = rmsData[rms][0]
|
||||
}
|
||||
|
||||
const rmsSecondA = rmsData[rms][iphasicValue * step + 1]
|
||||
rmsSA.push([rmsData[rms][0], rmsSecondA])
|
||||
rsmax = rsmax > rmsSecondA ? rsmax : rmsSecondA
|
||||
rsmin = rsmin < rmsSecondA ? rsmin : rmsSecondA
|
||||
if (rsmin < rmsvSecondY) {
|
||||
rmsvSecondY = rsmin
|
||||
secondeZhou = 'a'
|
||||
rmsvSecondX = rmsData[rms][0]
|
||||
}
|
||||
break
|
||||
case 2:
|
||||
const rmsFirstA2 = rmsData[rms][iphasicValue * step + 1] * xishu
|
||||
const rmsFirstB2 = rmsData[rms][iphasicValue * step + 2] * xishu
|
||||
rmsFA.push([rmsData[rms][0], rmsFirstA2])
|
||||
rmsFB.push([rmsData[rms][0], rmsFirstB2])
|
||||
rfmax = getMaxTwo(rfmax, rmsFirstA2, rmsFirstB2)
|
||||
rfmin = getMinOpen(rfmin, rmsFirstA2, rmsFirstB2)
|
||||
if (rfmin < rmsvFirstY) {
|
||||
rmsvFirstY = rfmin
|
||||
if (rfmin === rmsFirstA2) {
|
||||
firstZhou = 'a'
|
||||
} else if (rfmin === rmsFirstB2) {
|
||||
firstZhou = 'b'
|
||||
}
|
||||
rmsvFirstX = rmsData[rms][0]
|
||||
}
|
||||
|
||||
const rmsSecondA2 = rmsData[rms][iphasicValue * step + 1]
|
||||
const rmsSecondB2 = rmsData[rms][iphasicValue * step + 2]
|
||||
rmsSA.push([rmsData[rms][0], rmsSecondA2])
|
||||
rmsSB.push([rmsData[rms][0], rmsSecondB2])
|
||||
rsmax = getMaxTwo(rsmax, rmsSecondA2, rmsSecondB2)
|
||||
rsmin = getMinOpen(rsmin, rmsSecondA2, rmsSecondB2)
|
||||
if (rsmin < rmsvSecondY) {
|
||||
rmsvSecondY = rsmin
|
||||
if (rsmin === rmsSecondA2) {
|
||||
secondeZhou = 'a'
|
||||
} else if (rsmin === rmsSecondB2) {
|
||||
secondeZhou = 'b'
|
||||
}
|
||||
rmsvSecondX = rmsData[rms][0]
|
||||
}
|
||||
break
|
||||
case 3:
|
||||
const rmsFirstA3 = rmsData[rms][iphasicValue * step + 1] * xishu
|
||||
const rmsFirstB3 = rmsData[rms][iphasicValue * step + 2] * xishu
|
||||
const rmsFirstC3 = rmsData[rms][iphasicValue * step + 3] * xishu
|
||||
rmsFA.push([rmsData[rms][0], rmsFirstA3])
|
||||
rmsFB.push([rmsData[rms][0], rmsFirstB3])
|
||||
rmsFC.push([rmsData[rms][0], rmsFirstC3])
|
||||
rfmax = getMax(rfmax, rmsFirstA3, rmsFirstB3, rmsFirstC3)
|
||||
rfmin = isOpen
|
||||
? getMinOpen(rfmin, rmsFirstA3, rmsFirstC3)
|
||||
: getMin(rfmin, rmsFirstA3, rmsFirstB3, rmsFirstC3)
|
||||
if (rfmin < rmsvFirstY) {
|
||||
rmsvFirstY = rfmin
|
||||
if (rfmin === rmsFirstA3) {
|
||||
firstZhou = 'a'
|
||||
} else if (rfmin === rmsFirstB3) {
|
||||
firstZhou = 'b'
|
||||
} else {
|
||||
firstZhou = 'c'
|
||||
}
|
||||
rmsvFirstX = rmsData[rms][0]
|
||||
}
|
||||
|
||||
const rmsSecondA3 = rmsData[rms][iphasicValue * step + 1]
|
||||
const rmsSecondB3 = rmsData[rms][iphasicValue * step + 2]
|
||||
const rmsSecondC3 = rmsData[rms][iphasicValue * step + 3]
|
||||
rmsSA.push([rmsData[rms][0], rmsSecondA3])
|
||||
rmsSB.push([rmsData[rms][0], rmsSecondB3])
|
||||
rmsSC.push([rmsData[rms][0], rmsSecondC3])
|
||||
rsmax = getMax(rsmax, rmsSecondA3, rmsSecondB3, rmsSecondC3)
|
||||
rsmin = isOpen
|
||||
? getMinOpen(rsmin, rmsSecondA3, rmsSecondC3)
|
||||
: getMin(rsmin, rmsSecondA3, rmsSecondB3, rmsSecondC3)
|
||||
if (rsmin < rmsvSecondY) {
|
||||
rmsvSecondY = rsmin
|
||||
if (rsmin === rmsSecondA3) {
|
||||
secondeZhou = 'a'
|
||||
} else if (rsmin === rmsSecondB3) {
|
||||
secondeZhou = 'b'
|
||||
} else {
|
||||
secondeZhou = 'c'
|
||||
}
|
||||
rmsvSecondX = rmsData[rms][0]
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
const instantF = { max: ifmax, min: ifmin }
|
||||
const instantS = { max: ismax, min: ismin }
|
||||
const RMSF = { max: rfmax, min: rfmin }
|
||||
const RMSS = { max: rsmax, min: rsmin }
|
||||
const RMSFMinDetail = { rmsvFirstX, rmsvFirstY, firstZhou }
|
||||
const RMSSMinDetail = { rmsvSecondX, rmsvSecondY, secondeZhou }
|
||||
const shunshiF = { shunshiFA, shunshiFB, shunshiFC }
|
||||
const shunshiS = { shunshiSA, shunshiSB, shunshiSC }
|
||||
const RMSFWave = { rmsFA, rmsFB, rmsFC }
|
||||
const RMSSWave = { rmsSA, rmsSB, rmsSC }
|
||||
const title = { aTitle, bTitle, cTitle, unit }
|
||||
|
||||
return {
|
||||
instantF,
|
||||
instantS,
|
||||
RMSF,
|
||||
RMSS,
|
||||
RMSFMinDetail,
|
||||
RMSSMinDetail,
|
||||
shunshiF,
|
||||
shunshiS,
|
||||
RMSFWave,
|
||||
RMSSWave,
|
||||
title,
|
||||
unit
|
||||
}
|
||||
}
|
||||
|
||||
// 监听消息
|
||||
self.onmessage = function (e) {
|
||||
const { wp, isOpen, value, boxoList } = JSON.parse(e.data);
|
||||
const { wp, isOpen, value, boxoList } = JSON.parse(e.data)
|
||||
|
||||
try {
|
||||
const iphasicValue = wp.iphasic || 1;
|
||||
try {
|
||||
const iphasicValue = wp.iphasic || 1
|
||||
|
||||
const picCounts = (wp.waveTitle.length - 1) / iphasicValue;
|
||||
const waveDatas = [];
|
||||
const picCounts = (wp.waveTitle.length - 1) / iphasicValue
|
||||
const waveDatas = []
|
||||
|
||||
for (let i = 0; i < picCounts; i++) {
|
||||
const data = fliteWaveData(wp, i, iphasicValue, isOpen,boxoList);
|
||||
waveDatas.push(data);
|
||||
for (let i = 0; i < picCounts; i++) {
|
||||
const data = fliteWaveData(wp, i, iphasicValue, isOpen, boxoList)
|
||||
waveDatas.push(data)
|
||||
}
|
||||
// 处理标题
|
||||
let titles = ''
|
||||
if (boxoList.systemType == 'pms') {
|
||||
titles =
|
||||
'变电站名称:' +
|
||||
boxoList.powerStationName +
|
||||
' 监测点名称:' +
|
||||
boxoList.measurementPointName +
|
||||
' 发生时刻:' +
|
||||
boxoList.startTime +
|
||||
' 残余电压:' +
|
||||
(boxoList.featureAmplitude * 100).toFixed(2) +
|
||||
'% 持续时间:' +
|
||||
boxoList.duration +
|
||||
's'
|
||||
} else if (boxoList.systemType == 'ZL') {
|
||||
titles =
|
||||
' 监测点名称:' +
|
||||
boxoList.equipmentName +
|
||||
' 发生时刻:' +
|
||||
boxoList.startTime +
|
||||
' 残余电压:' +
|
||||
boxoList.evtParamVVaDepth +
|
||||
' 持续时间:' +
|
||||
boxoList.evtParamTm +
|
||||
's'
|
||||
} else if (boxoList.systemType == 'YPT') {
|
||||
titles =
|
||||
' 监测点名称:' +
|
||||
boxoList.lineName +
|
||||
' 发生时刻:' +
|
||||
boxoList.startTime +
|
||||
' 残余电压:' +
|
||||
(boxoList.featureAmplitude * 100).toFixed(2) +
|
||||
'% 持续时间:' +
|
||||
boxoList.persistTime +
|
||||
's'
|
||||
} else {
|
||||
titles =
|
||||
'变电站名称:' +
|
||||
boxoList.subName +
|
||||
' 监测点名称:' +
|
||||
boxoList.lineName +
|
||||
' 发生时刻:' +
|
||||
boxoList.startTime +
|
||||
' 残余电压:' +
|
||||
(boxoList.featureAmplitude * 100).toFixed(2) +
|
||||
'% 持续时间:' +
|
||||
boxoList.duration +
|
||||
's'
|
||||
}
|
||||
// 发送处理结果回主线程
|
||||
self.postMessage({
|
||||
titles: titles,
|
||||
success: true,
|
||||
waveDatas,
|
||||
time: wp.time,
|
||||
type: wp.waveType,
|
||||
severity: wp.yzd,
|
||||
iphasic: iphasicValue
|
||||
})
|
||||
} catch (error) {
|
||||
self.postMessage({
|
||||
success: false,
|
||||
error: error.message
|
||||
})
|
||||
}
|
||||
// 处理标题
|
||||
let titles = "";
|
||||
if (boxoList.systemType == "pms") {
|
||||
titles =
|
||||
"变电站名称:" +
|
||||
boxoList.powerStationName +
|
||||
" 监测点名称:" +
|
||||
boxoList.measurementPointName +
|
||||
" 发生时刻:" +
|
||||
boxoList.startTime +
|
||||
" 残余电压:" +
|
||||
(boxoList.featureAmplitude * 100).toFixed(2) +
|
||||
"% 持续时间:" +
|
||||
boxoList.duration +
|
||||
"s";
|
||||
} else if (boxoList.systemType == "ZL") {
|
||||
titles =
|
||||
" 监测点名称:" +
|
||||
boxoList.equipmentName +
|
||||
" 发生时刻:" +
|
||||
boxoList.startTime +
|
||||
" 残余电压:" +
|
||||
boxoList.evtParamVVaDepth +
|
||||
" 持续时间:" +
|
||||
boxoList.evtParamTm +
|
||||
"s";
|
||||
} else {
|
||||
titles =
|
||||
"变电站名称:" +
|
||||
boxoList.subName +
|
||||
" 监测点名称:" +
|
||||
boxoList.lineName +
|
||||
" 发生时刻:" +
|
||||
boxoList.startTime +
|
||||
" 残余电压:" +
|
||||
(boxoList.featureAmplitude * 100).toFixed(2) +
|
||||
"% 持续时间:" +
|
||||
boxoList.duration +
|
||||
"s";
|
||||
}
|
||||
// 发送处理结果回主线程
|
||||
self.postMessage({
|
||||
titles: titles,
|
||||
success: true,
|
||||
waveDatas,
|
||||
time: wp.time,
|
||||
type: wp.waveType,
|
||||
severity: wp.yzd,
|
||||
iphasic: iphasicValue,
|
||||
});
|
||||
} catch (error) {
|
||||
self.postMessage({
|
||||
success: false,
|
||||
error: error.message,
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<template>
|
||||
|
||||
<div v-loading="loading" :element-loading-background="'rgba(122, 122, 122, 0.8)'"
|
||||
style="position: relative;height: 100%;">
|
||||
|
||||
<div id="boxr" style="background: #343849c7">
|
||||
<div v-loading="loading" style="position: relative; height: 100%">
|
||||
<div id="boxr">
|
||||
<div id="rmsp" :style="`height:${vh};overflow: hidden;`">
|
||||
<div class="bx" id="rms"></div>
|
||||
</div>
|
||||
@@ -16,6 +13,7 @@ import { ref, computed, onMounted, onBeforeUnmount, watch, nextTick } from 'vue'
|
||||
import html2canvas from 'html2canvas'
|
||||
import $ from 'jquery'
|
||||
import * as echarts from 'echarts'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import url from '@/assets/img/point.png'
|
||||
import url2 from '@/assets/img/dw.png'
|
||||
const worker = ref<Worker | null>(null)
|
||||
@@ -66,7 +64,7 @@ interface WaveData {
|
||||
interface Props {
|
||||
value?: number
|
||||
flag?: string | number | boolean
|
||||
parentHeight?: string | number | boolean
|
||||
parentHeight?: any
|
||||
DColor?: boolean
|
||||
boxoList?: any
|
||||
wp?: any
|
||||
@@ -78,7 +76,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
parentHeight: 0,
|
||||
DColor: false,
|
||||
boxoList: () => ({}),
|
||||
wp: () => ({}),
|
||||
wp: () => ({})
|
||||
})
|
||||
|
||||
const loading = ref(true)
|
||||
@@ -110,34 +108,41 @@ const myChartess4 = ref<echarts.ECharts | null>(null)
|
||||
const myChartess5 = ref<echarts.ECharts | null>(null)
|
||||
|
||||
const vh = computed(() => {
|
||||
if (props.flag == 1) {
|
||||
return '690px'
|
||||
} else if (props.parentHeight != 0) {
|
||||
if (props.parentHeight == 999) {
|
||||
return '310px'
|
||||
} else if (props.parentHeight != 0) {
|
||||
return mainHeight(props.parentHeight, 2).height
|
||||
}
|
||||
|
||||
if (props.flag == 1) {
|
||||
return mainHeight(200).height
|
||||
} else {
|
||||
return '350px'
|
||||
return mainHeight(200, 2).height
|
||||
}
|
||||
})
|
||||
|
||||
const vw = computed(() => '100%')
|
||||
|
||||
watch(() => props.value, (newVal) => {
|
||||
if (newVal == 2) {
|
||||
initWaves()
|
||||
} else {
|
||||
$('#wave1').remove()
|
||||
initWaves()
|
||||
watch(
|
||||
() => props.value,
|
||||
newVal => {
|
||||
if (newVal == 2) {
|
||||
initWaves()
|
||||
} else {
|
||||
$('#wave1').remove()
|
||||
initWaves()
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
const zoomValue = document.body.style.getPropertyValue('zoom');
|
||||
zoom.value = 1 / (zoomValue ? parseFloat(zoomValue) : 1);
|
||||
const zoomValue = document.body.style.getPropertyValue('zoom')
|
||||
zoom.value = 1 / (zoomValue ? parseFloat(zoomValue) : 1)
|
||||
window.addEventListener('resize', handleResize)
|
||||
|
||||
// 初始化 Web Worker
|
||||
worker.value = new Worker(new URL('./rmsWorker.js', import.meta.url));
|
||||
worker.value.onmessage = (e) => {
|
||||
worker.value = new Worker(new URL('./rmsWorker.js', import.meta.url))
|
||||
worker.value.onmessage = e => {
|
||||
if (e.data.success) {
|
||||
const data = e.data
|
||||
titles.value = data.titles
|
||||
@@ -171,15 +176,15 @@ onBeforeUnmount(() => {
|
||||
})
|
||||
|
||||
const handleResize = () => {
|
||||
const zoomValue = document.body.style.getPropertyValue('zoom');
|
||||
zoom.value = 1 / (zoomValue ? parseFloat(zoomValue) : 1);
|
||||
const zoomValue = document.body.style.getPropertyValue('zoom')
|
||||
zoom.value = 1 / (zoomValue ? parseFloat(zoomValue) : 1)
|
||||
}
|
||||
|
||||
const download = () => {
|
||||
const boxr = document.getElementById('boxr')
|
||||
if (boxr) {
|
||||
html2canvas(boxr, {
|
||||
scale: 2,
|
||||
scale: 2
|
||||
}).then(function (canvas) {
|
||||
const creatIMg = document.createElement('a')
|
||||
creatIMg.download = 'rms波形.png'
|
||||
@@ -195,13 +200,14 @@ const query = () => {
|
||||
if (props.wp) {
|
||||
// 使用 Worker 处理数据
|
||||
if (worker.value) {
|
||||
|
||||
worker.value.postMessage(JSON.stringify({
|
||||
wp: props.wp,
|
||||
isOpen: isOpen.value,
|
||||
value: props.value,
|
||||
boxoList: props.boxoList
|
||||
}))
|
||||
worker.value.postMessage(
|
||||
JSON.stringify({
|
||||
wp: props.wp,
|
||||
isOpen: isOpen.value,
|
||||
value: props.value,
|
||||
boxoList: props.boxoList
|
||||
})
|
||||
)
|
||||
}
|
||||
} else {
|
||||
initWave(null, null, null, null, null)
|
||||
@@ -240,7 +246,6 @@ const waveData = (
|
||||
|
||||
const initWaves = () => {
|
||||
if (props.wp) {
|
||||
|
||||
iphasic.value = props.wp.iphasic || 1
|
||||
const picCounts = (props.wp.waveTitle.length - 1) / iphasic.value
|
||||
waveDatas.value = []
|
||||
@@ -266,15 +271,29 @@ const initWaves = () => {
|
||||
}
|
||||
|
||||
const fliteWaveData = (wp: any, step: number): WaveData => {
|
||||
|
||||
const rmsData = wp.listRmsData
|
||||
const pt = Number(wp.pt) / 1000
|
||||
const ct = Number(wp.ct)
|
||||
const titleList = wp.waveTitle
|
||||
let xishu = pt
|
||||
let aTitle = '', bTitle = '', cTitle = '', unit = '电压'
|
||||
let rmsvFirstX = 0, rmsvFirstY = 0, rmsvSecondX = 0, rmsvSecondY = 0, firstZhou = 'a', secondeZhou = 'a'
|
||||
let ifmax = 0, ifmin = 0, ismax = 0, ismin = 0, rfmax = 0, rfmin = 0, rsmax = 0, rsmin = 0
|
||||
let aTitle = '',
|
||||
bTitle = '',
|
||||
cTitle = '',
|
||||
unit = '电压'
|
||||
let rmsvFirstX = 0,
|
||||
rmsvFirstY = 0,
|
||||
rmsvSecondX = 0,
|
||||
rmsvSecondY = 0,
|
||||
firstZhou = 'a',
|
||||
secondeZhou = 'a'
|
||||
let ifmax = 0,
|
||||
ifmin = 0,
|
||||
ismax = 0,
|
||||
ismin = 0,
|
||||
rfmax = 0,
|
||||
rfmin = 0,
|
||||
rsmax = 0,
|
||||
rsmin = 0
|
||||
|
||||
const shunshiFA: number[][] = []
|
||||
const shunshiFB: number[][] = []
|
||||
@@ -289,7 +308,6 @@ const fliteWaveData = (wp: any, step: number): WaveData => {
|
||||
const rmsSB: number[][] = []
|
||||
const rmsSC: number[][] = []
|
||||
|
||||
|
||||
if (titleList[iphasic.value * step + 1]?.substring(0, 1) !== 'U') {
|
||||
xishu = ct
|
||||
unit = '电流'
|
||||
@@ -309,8 +327,6 @@ const fliteWaveData = (wp: any, step: number): WaveData => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (rmsData[0][iphasic.value * step + 1] !== undefined) {
|
||||
rfmax = rmsData[0][iphasic.value * step + 1] * xishu
|
||||
rfmin = rmsData[0][iphasic.value * step + 1] * xishu
|
||||
@@ -322,8 +338,6 @@ const fliteWaveData = (wp: any, step: number): WaveData => {
|
||||
rmsvSecondX = rmsData[0][0]
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (let rms = 0; rms < rmsData.length; rms++) {
|
||||
if (rmsData[rms][iphasic.value * step + 1] === undefined) {
|
||||
break
|
||||
@@ -388,12 +402,14 @@ const fliteWaveData = (wp: any, step: number): WaveData => {
|
||||
const rmsFirstA3 = rmsData[rms][iphasic.value * step + 1] * xishu
|
||||
const rmsFirstB3 = rmsData[rms][iphasic.value * step + 2] * xishu
|
||||
const rmsFirstC3 = rmsData[rms][iphasic.value * step + 3] * xishu
|
||||
rmsFA.push([rmsData[rms][0], rmsFirstA3]);
|
||||
rmsFA.push([rmsData[rms][0], rmsFirstA3])
|
||||
|
||||
rmsFB.push([rmsData[rms][0], rmsFirstB3]);
|
||||
rmsFC.push([rmsData[rms][0], rmsFirstC3]);
|
||||
rmsFB.push([rmsData[rms][0], rmsFirstB3])
|
||||
rmsFC.push([rmsData[rms][0], rmsFirstC3])
|
||||
rfmax = getMax(rfmax, rmsFirstA3, rmsFirstB3, rmsFirstC3)
|
||||
rfmin = isOpen.value ? getMinOpen(rfmin, rmsFirstA3, rmsFirstC3) : getMin(rfmin, rmsFirstA3, rmsFirstB3, rmsFirstC3)
|
||||
rfmin = isOpen.value
|
||||
? getMinOpen(rfmin, rmsFirstA3, rmsFirstC3)
|
||||
: getMin(rfmin, rmsFirstA3, rmsFirstB3, rmsFirstC3)
|
||||
if (rfmin < rmsvFirstY) {
|
||||
rmsvFirstY = rfmin
|
||||
if (rfmin === rmsFirstA3) {
|
||||
@@ -413,7 +429,9 @@ const fliteWaveData = (wp: any, step: number): WaveData => {
|
||||
rmsSB.push([rmsData[rms][0], rmsSecondB3])
|
||||
rmsSC.push([rmsData[rms][0], rmsSecondC3])
|
||||
rsmax = getMax(rsmax, rmsSecondA3, rmsSecondB3, rmsSecondC3)
|
||||
rsmin = isOpen.value ? getMinOpen(rsmin, rmsSecondA3, rmsSecondC3) : getMin(rsmin, rmsSecondA3, rmsSecondB3, rmsSecondC3)
|
||||
rsmin = isOpen.value
|
||||
? getMinOpen(rsmin, rmsSecondA3, rmsSecondC3)
|
||||
: getMin(rsmin, rmsSecondA3, rmsSecondB3, rmsSecondC3)
|
||||
if (rsmin < rmsvSecondY) {
|
||||
rmsvSecondY = rsmin
|
||||
if (rsmin === rmsSecondA3) {
|
||||
@@ -429,7 +447,6 @@ const fliteWaveData = (wp: any, step: number): WaveData => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const instantF = { max: ifmax, min: ifmin }
|
||||
const instantS = { max: ismax, min: ismin }
|
||||
const RMSF = { max: rfmax, min: rfmin }
|
||||
@@ -442,11 +459,29 @@ const fliteWaveData = (wp: any, step: number): WaveData => {
|
||||
const RMSSWave = { rmsSA, rmsSB, rmsSC }
|
||||
const title = { aTitle, bTitle, cTitle, unit }
|
||||
|
||||
return waveData(instantF, instantS, RMSF, RMSS, RMSFMinDetail, RMSSMinDetail, shunshiF, shunshiS, RMSFWave, RMSSWave, title, unit)
|
||||
return waveData(
|
||||
instantF,
|
||||
instantS,
|
||||
RMSF,
|
||||
RMSS,
|
||||
RMSFMinDetail,
|
||||
RMSSMinDetail,
|
||||
shunshiF,
|
||||
shunshiS,
|
||||
RMSFWave,
|
||||
RMSSWave,
|
||||
title,
|
||||
unit
|
||||
)
|
||||
}
|
||||
|
||||
const initWave = (waveDatas: WaveData[] | null, time: string | null, type: string | null, severity: string | null, isOpen: boolean | null) => {
|
||||
|
||||
const initWave = (
|
||||
waveDatas: WaveData[] | null,
|
||||
time: string | null,
|
||||
type: string | null,
|
||||
severity: string | null,
|
||||
isOpen: boolean | null
|
||||
) => {
|
||||
$('div.bx').remove()
|
||||
|
||||
let picHeight = vh.value
|
||||
@@ -456,9 +491,15 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
let rmscm: number[][] = []
|
||||
let titleText = ''
|
||||
let unit = ''
|
||||
let a: string | null = null, b: string | null = null, c: string | null = null
|
||||
let radata: number[][] = [], rbdata: number[][] = [], rcdata: number[][] = []
|
||||
let rmsvX: any = 0, rmsvY: any = 0, zhou = ''
|
||||
let a: string | null = null,
|
||||
b: string | null = null,
|
||||
c: string | null = null
|
||||
let radata: number[][] = [],
|
||||
rbdata: number[][] = [],
|
||||
rcdata: number[][] = []
|
||||
let rmsvX: any = 0,
|
||||
rmsvY: any = 0,
|
||||
zhou = ''
|
||||
|
||||
if (!waveDatas) {
|
||||
titleText = '该事件暂无波形图'
|
||||
@@ -543,10 +584,7 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
]
|
||||
unit = 'kV'
|
||||
} else {
|
||||
fz.value = [
|
||||
props.wp.listRmsMinData[0][0],
|
||||
props.wp.listRmsMinData[0][1]
|
||||
]
|
||||
fz.value = [props.wp.listRmsMinData[0][0], props.wp.listRmsMinData[0][1]]
|
||||
unit = 'V'
|
||||
}
|
||||
} else {
|
||||
@@ -555,18 +593,40 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
|
||||
for (let step = waveDatas.length - 1; step > 0 && step < waveDatas.length; step--) {
|
||||
const rmsId = 'rms' + step
|
||||
const newDivRms = $(`<div style="height:${vh.value};overflow: hidden;"><div class='bx' id='${rmsId}'></div></div>`)
|
||||
const newDivRms = $(
|
||||
`<div style="height:${vh.value};overflow: hidden;"><div class='bx' id='${rmsId}'></div></div>`
|
||||
)
|
||||
newDivRms.insertAfter($('#rmsp'))
|
||||
$(`#${rmsId}`).css('height', picHeight).css('width', vw.value)
|
||||
}
|
||||
} else {
|
||||
titleText = `变电站名称:${subName.value} 监测点名称:${lineName.value} 发生时刻:${time} 残余电压:${(Number(eventValue.value) * 1).toFixed(0)}% 持续时间:${persistTime.value}s`
|
||||
titleText = `变电站名称:${subName.value} 监测点名称:${lineName.value} 发生时刻:${time} 残余电压:${(
|
||||
Number(eventValue.value) * 1
|
||||
).toFixed(0)}% 持续时间:${persistTime.value}s`
|
||||
}
|
||||
const rms = document.getElementById('rmsp')
|
||||
|
||||
if (!rms) return
|
||||
const myChartes = echarts.init(rms)
|
||||
const echartsColor = { WordColor: "#fff", thread: "#fff", FigureColor: ["#07CCCA ", "#00BFF5", "#FFBF00", "#77DA63", "#D5FF6B", "#Ff6600", "#FF9100", "#5B6E96", "#66FFCC", "#B3B3B3", "#FF00FF", "#CC00FF", "#FF9999"] }
|
||||
const echartsColor = {
|
||||
WordColor: '#000',
|
||||
thread: '#000',
|
||||
FigureColor: [
|
||||
'#07CCCA ',
|
||||
'#00BFF5',
|
||||
'#FFBF00',
|
||||
'#77DA63',
|
||||
'#D5FF6B',
|
||||
'#Ff6600',
|
||||
'#FF9100',
|
||||
'#5B6E96',
|
||||
'#66FFCC',
|
||||
'#B3B3B3',
|
||||
'#FF00FF',
|
||||
'#CC00FF',
|
||||
'#FF9999'
|
||||
]
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
rms.style.width = '100%'
|
||||
@@ -582,7 +642,12 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
let tips = '时刻:' + params[0].data[0] + '</br/>'
|
||||
for (let i = 0; i < params.length; i++) {
|
||||
if (params[i].seriesName != '暂降触发点') {
|
||||
tips += params[i].marker + params[i].seriesName + ':' + (params[i].value[1] - 0).toFixed(2) + '<br/>'
|
||||
tips +=
|
||||
params[i].marker +
|
||||
params[i].seriesName +
|
||||
':' +
|
||||
(params[i].value[1] - 0).toFixed(2) +
|
||||
'<br/>'
|
||||
}
|
||||
}
|
||||
return tips
|
||||
@@ -604,8 +669,8 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
align: 'left'
|
||||
},
|
||||
textStyle: {
|
||||
fontSize: '0.8rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor
|
||||
fontSize: '16px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
@@ -615,8 +680,8 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
enabled: true,
|
||||
itemDistance: 5,
|
||||
textStyle: {
|
||||
fontSize: '0.7rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor,
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor,
|
||||
rich: { a: { verticalAlign: 'middle' } },
|
||||
padding: [0, 0, 0, 0]
|
||||
}
|
||||
@@ -641,13 +706,13 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
title: {
|
||||
text: 'ms',
|
||||
textStyle: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor
|
||||
},
|
||||
enabled: true,
|
||||
align: 'high'
|
||||
},
|
||||
nameTextStyle: { fontSize: '0.6rem' },
|
||||
nameTextStyle: { fontSize: '12px' },
|
||||
labels: {
|
||||
formatter: function () {
|
||||
return this.value
|
||||
@@ -657,13 +722,13 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
axisTick: { alignWithLabel: true },
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: props.DColor ? '#fff' : echartsColor.thread
|
||||
color: props.DColor ? '#000' : echartsColor.thread
|
||||
},
|
||||
onZero: false
|
||||
},
|
||||
axisLabel: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor,
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor,
|
||||
formatter: function (value: number) {
|
||||
if (valA.value != (value - 0).toFixed(0)) {
|
||||
valA.value = Number((value - 0).toFixed(0))
|
||||
@@ -684,31 +749,31 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
y: -10
|
||||
},
|
||||
max: rmscm[0]?.[1] * 1.06 || 0,
|
||||
min: rmscu[0]?.[1] - (rmscu[0]?.[1] * 0.04) || 0,
|
||||
min: rmscu[0]?.[1] - rmscu[0]?.[1] * 0.04 || 0,
|
||||
boundaryGap: [0, '100%'],
|
||||
showLastLabel: true,
|
||||
opposite: false,
|
||||
nameTextStyle: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: props.DColor ? '#fff' : echartsColor.thread
|
||||
color: props.DColor ? '#000' : echartsColor.thread
|
||||
},
|
||||
onZero: false
|
||||
},
|
||||
axisLabel: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor,
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor,
|
||||
formatter: function (value: number) {
|
||||
return (value - 0).toFixed(2)
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: [props.DColor ? '#fff' : echartsColor.thread],
|
||||
color: [props.DColor ? '#000' : echartsColor.thread],
|
||||
type: 'dashed',
|
||||
opacity: 0.5
|
||||
}
|
||||
@@ -718,7 +783,7 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
left: '1%',
|
||||
right: '45px',
|
||||
bottom: '40px',
|
||||
top: '70px',
|
||||
top: '60px',
|
||||
containLabel: true
|
||||
},
|
||||
dataZoom: [
|
||||
@@ -780,7 +845,7 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
show: true,
|
||||
position: [5, -20],
|
||||
color: '#000',
|
||||
fontSize: '14px',
|
||||
fontSize: '12px',
|
||||
fontWeight: 'bold',
|
||||
borderType: 'solid',
|
||||
borderWidth: 0.5,
|
||||
@@ -792,7 +857,6 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
myChartes.setOption(option)
|
||||
myChartess.value = myChartes
|
||||
|
||||
@@ -809,12 +873,25 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
}
|
||||
}
|
||||
|
||||
const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show: boolean, myChartes1: echarts.ECharts, rmscm: number[][], rmscu: number[][], title: string) => {
|
||||
const drawPics = (
|
||||
waveDataTemp: WaveData,
|
||||
picHeight: string,
|
||||
step: number,
|
||||
show: boolean,
|
||||
myChartes1: echarts.ECharts,
|
||||
rmscm: number[][],
|
||||
rmscu: number[][],
|
||||
title: string
|
||||
) => {
|
||||
step = step + 1
|
||||
const rmsId = 'rms' + step
|
||||
let a = '', b = '', c = ''
|
||||
let a = '',
|
||||
b = '',
|
||||
c = ''
|
||||
let unit = ''
|
||||
let radata: number[][] = [], rbdata: number[][] = [], rcdata: number[][] = []
|
||||
let radata: number[][] = [],
|
||||
rbdata: number[][] = [],
|
||||
rcdata: number[][] = []
|
||||
|
||||
switch (iphasic.value) {
|
||||
case 1:
|
||||
@@ -877,7 +954,25 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
if (!rmsIds) return
|
||||
|
||||
const myChartes = echarts.init(rmsIds)
|
||||
const echartsColor = { WordColor: "#fff", thread: "#fff", FigureColor: ["#07CCCA ", "#00BFF5", "#FFBF00", "#77DA63", "#D5FF6B", "#Ff6600", "#FF9100", "#5B6E96", "#66FFCC", "#B3B3B3", "#FF00FF", "#CC00FF", "#FF9999"] }
|
||||
const echartsColor = {
|
||||
WordColor: '#000',
|
||||
thread: '#000',
|
||||
FigureColor: [
|
||||
'#07CCCA ',
|
||||
'#00BFF5',
|
||||
'#FFBF00',
|
||||
'#77DA63',
|
||||
'#D5FF6B',
|
||||
'#Ff6600',
|
||||
'#FF9100',
|
||||
'#5B6E96',
|
||||
'#66FFCC',
|
||||
'#B3B3B3',
|
||||
'#FF00FF',
|
||||
'#CC00FF',
|
||||
'#FF9999'
|
||||
]
|
||||
}
|
||||
|
||||
const option = {
|
||||
tooltip: {
|
||||
@@ -888,7 +983,12 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
let tips = '时刻:' + params[0].data[0] + '</br/>'
|
||||
for (let i = 0; i < params.length; i++) {
|
||||
if (params[i].seriesName != '暂降触发点') {
|
||||
tips += params[i].marker + params[i].seriesName + ':' + (params[i].value[1] - 0).toFixed(2) + '<br/>'
|
||||
tips +=
|
||||
params[i].marker +
|
||||
params[i].seriesName +
|
||||
':' +
|
||||
(params[i].value[1] - 0).toFixed(2) +
|
||||
'<br/>'
|
||||
}
|
||||
}
|
||||
return tips
|
||||
@@ -904,10 +1004,10 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
},
|
||||
title: {
|
||||
left: 'center',
|
||||
text: '',//titlename || title,
|
||||
text: '', //titlename || title,
|
||||
textStyle: {
|
||||
fontSize: '0.8rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor
|
||||
fontSize: '16px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
@@ -917,8 +1017,8 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
enabled: true,
|
||||
itemDistance: 5,
|
||||
textStyle: {
|
||||
fontSize: '0.7rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor,
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor,
|
||||
rich: { a: { verticalAlign: 'middle' } },
|
||||
padding: [0, 0, 0, 0]
|
||||
}
|
||||
@@ -932,8 +1032,8 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
title: {
|
||||
text: 'ms',
|
||||
textStyle: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor
|
||||
},
|
||||
enabled: true,
|
||||
align: 'high'
|
||||
@@ -943,18 +1043,18 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
return this.value
|
||||
}
|
||||
},
|
||||
nameTextStyle: { fontSize: '0.6rem' },
|
||||
nameTextStyle: { fontSize: '12px' },
|
||||
splitLine: { show: false },
|
||||
axisTick: { alignWithLabel: true },
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: props.DColor ? '#fff' : echartsColor.thread
|
||||
color: props.DColor ? '#000' : echartsColor.thread
|
||||
},
|
||||
onZero: false
|
||||
},
|
||||
axisLabel: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor,
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor,
|
||||
formatter: function (value: number) {
|
||||
if (valB.value != (value - 0).toFixed(0)) {
|
||||
valB.value = Number((value - 0).toFixed(0))
|
||||
@@ -978,26 +1078,26 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
showLastLabel: true,
|
||||
opposite: false,
|
||||
nameTextStyle: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: props.DColor ? '#fff' : echartsColor.thread
|
||||
color: props.DColor ? '#000' : echartsColor.thread
|
||||
},
|
||||
onZero: false
|
||||
},
|
||||
axisLabel: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor,
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor,
|
||||
formatter: function (value: number) {
|
||||
return (value - 0).toFixed(2)
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: [props.DColor ? '#fff' : echartsColor.thread],
|
||||
color: [props.DColor ? '#000' : echartsColor.thread],
|
||||
type: 'dashed',
|
||||
opacity: 0.5
|
||||
}
|
||||
@@ -1007,7 +1107,7 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
left: '1%',
|
||||
right: '45px',
|
||||
bottom: '40px',
|
||||
top: '70px',
|
||||
top: '60px',
|
||||
containLabel: true
|
||||
},
|
||||
dataZoom: [
|
||||
@@ -1059,11 +1159,21 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
myChartes.setOption(option)
|
||||
|
||||
switch (step) {
|
||||
case 1: myChartess1.value = myChartes; break
|
||||
case 2: myChartess2.value = myChartes; break
|
||||
case 3: myChartess3.value = myChartes; break
|
||||
case 4: myChartess4.value = myChartes; break
|
||||
case 5: myChartess5.value = myChartes; break
|
||||
case 1:
|
||||
myChartess1.value = myChartes
|
||||
break
|
||||
case 2:
|
||||
myChartess2.value = myChartes
|
||||
break
|
||||
case 3:
|
||||
myChartess3.value = myChartes
|
||||
break
|
||||
case 4:
|
||||
myChartess4.value = myChartes
|
||||
break
|
||||
case 5:
|
||||
myChartess5.value = myChartes
|
||||
break
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
@@ -1076,7 +1186,14 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
|
||||
const backbxlb = () => {
|
||||
waveDatas.value = []
|
||||
const charts = [myChartess.value, myChartess1.value, myChartess2.value, myChartess3.value, myChartess4.value, myChartess5.value]
|
||||
const charts = [
|
||||
myChartess.value,
|
||||
myChartess1.value,
|
||||
myChartess2.value,
|
||||
myChartess3.value,
|
||||
myChartess4.value,
|
||||
myChartess5.value
|
||||
]
|
||||
|
||||
charts.forEach(chart => {
|
||||
if (chart) {
|
||||
@@ -1092,13 +1209,11 @@ const backbxlb = () => {
|
||||
myChartess5.value = null
|
||||
|
||||
// echarts.disconnect(charts.filter(Boolean) as echarts.ECharts[])
|
||||
charts
|
||||
.filter(Boolean)
|
||||
.forEach(chart => {
|
||||
if (chart && typeof chart.dispose === 'function') {
|
||||
chart.dispose();
|
||||
}
|
||||
});
|
||||
charts.filter(Boolean).forEach(chart => {
|
||||
if (chart && typeof chart.dispose === 'function') {
|
||||
chart.dispose()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const getMax = (temp: number, tempA: number, tempB: number, tempC: number): number => {
|
||||
@@ -1126,4 +1241,4 @@ const getMinOpen = (temp: number, tempA: number, tempB: number): number => {
|
||||
temp = temp < tempB ? temp : tempB
|
||||
return temp
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,179 +1,203 @@
|
||||
// waveData.worker.js
|
||||
self.addEventListener('message', function(e) {
|
||||
const { wp, value, iphasic, isOpen, boxoList } = JSON.parse(e.data);
|
||||
|
||||
// 处理波形数据的函数
|
||||
const fliteWaveData = (wp, step) => {
|
||||
// 将原有的fliteWaveData函数实现复制到这里
|
||||
const shunData = wp.listWaveData;
|
||||
const pt = Number(wp.pt) / 1000;
|
||||
const ct = Number(wp.ct);
|
||||
const titleList = wp.waveTitle;
|
||||
let xishu = pt;
|
||||
let aTitle = '', bTitle = '', cTitle = '', unit = '电压';
|
||||
let ifmax = 0, ifmin = 0, ismax = 0, ismin = 0;
|
||||
self.addEventListener('message', function (e) {
|
||||
const { wp, value, iphasic, isOpen, boxoList } = JSON.parse(e.data)
|
||||
|
||||
const shunshiFA = [];
|
||||
const shunshiFB = [];
|
||||
const shunshiFC = [];
|
||||
const shunshiSA = [];
|
||||
const shunshiSB = [];
|
||||
const shunshiSC = [];
|
||||
// 处理波形数据的函数
|
||||
const fliteWaveData = (wp, step) => {
|
||||
// 将原有的fliteWaveData函数实现复制到这里
|
||||
const shunData = wp.listWaveData
|
||||
const pt = Number(wp.pt) / 1000
|
||||
const ct = Number(wp.ct)
|
||||
const titleList = wp.waveTitle
|
||||
let xishu = pt
|
||||
let aTitle = '',
|
||||
bTitle = '',
|
||||
cTitle = '',
|
||||
unit = '电压'
|
||||
let ifmax = 0,
|
||||
ifmin = 0,
|
||||
ismax = 0,
|
||||
ismin = 0
|
||||
|
||||
if (shunData.length > 0) {
|
||||
if (titleList[iphasic * step + 1]?.substring(0, 1) !== 'U') {
|
||||
xishu = ct;
|
||||
unit = '电流';
|
||||
}
|
||||
const shunshiFA = []
|
||||
const shunshiFB = []
|
||||
const shunshiFC = []
|
||||
const shunshiSA = []
|
||||
const shunshiSB = []
|
||||
const shunshiSC = []
|
||||
|
||||
for (let i = 1; i <= iphasic; i++) {
|
||||
switch (i) {
|
||||
case 1:
|
||||
aTitle = titleList[iphasic * step + i]?.substring(1) || '';
|
||||
break;
|
||||
case 2:
|
||||
bTitle = titleList[iphasic * step + i]?.substring(1) || '';
|
||||
break;
|
||||
case 3:
|
||||
cTitle = titleList[iphasic * step + i]?.substring(1) || '';
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (shunData.length > 0) {
|
||||
if (titleList[iphasic * step + 1]?.substring(0, 1) !== 'U') {
|
||||
xishu = ct
|
||||
unit = '电流'
|
||||
}
|
||||
|
||||
if (shunData[0][iphasic * step + 1] !== undefined) {
|
||||
ifmax = shunData[0][iphasic * step + 1] * xishu;
|
||||
ifmin = shunData[0][iphasic * step + 1] * xishu;
|
||||
ismax = shunData[0][iphasic * step + 1];
|
||||
ismin = shunData[0][iphasic * step + 1];
|
||||
}
|
||||
for (let i = 1; i <= iphasic; i++) {
|
||||
switch (i) {
|
||||
case 1:
|
||||
aTitle = titleList[iphasic * step + i]?.substring(1) || ''
|
||||
break
|
||||
case 2:
|
||||
bTitle = titleList[iphasic * step + i]?.substring(1) || ''
|
||||
break
|
||||
case 3:
|
||||
cTitle = titleList[iphasic * step + i]?.substring(1) || ''
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
for (let shun = 0; shun < shunData.length; shun++) {
|
||||
if (shunData[shun][iphasic * step + 1] === undefined) {
|
||||
break;
|
||||
if (shunData[0][iphasic * step + 1] !== undefined) {
|
||||
ifmax = shunData[0][iphasic * step + 1] * xishu
|
||||
ifmin = shunData[0][iphasic * step + 1] * xishu
|
||||
ismax = shunData[0][iphasic * step + 1]
|
||||
ismin = shunData[0][iphasic * step + 1]
|
||||
}
|
||||
|
||||
for (let shun = 0; shun < shunData.length; shun++) {
|
||||
if (shunData[shun][iphasic * step + 1] === undefined) {
|
||||
break
|
||||
}
|
||||
|
||||
switch (iphasic) {
|
||||
case 1:
|
||||
const shunFirstA = shunData[shun][iphasic * step + 1] * xishu
|
||||
shunshiFA.push([shunData[shun][0], shunFirstA])
|
||||
ifmax = Math.max(ifmax, shunFirstA)
|
||||
ifmin = Math.min(ifmin, shunFirstA)
|
||||
|
||||
const shunSecondA = shunData[shun][iphasic * step + 1]
|
||||
shunshiSA.push([shunData[shun][0], shunSecondA])
|
||||
ismax = Math.max(ismax, shunSecondA)
|
||||
ismin = Math.min(ismin, shunSecondA)
|
||||
break
|
||||
case 2:
|
||||
const shunFirstA2 = shunData[shun][iphasic * step + 1] * xishu
|
||||
const shunFirstB2 = shunData[shun][iphasic * step + 2] * xishu
|
||||
shunshiFA.push([shunData[shun][0], shunFirstA2])
|
||||
shunshiFB.push([shunData[shun][0], shunFirstB2])
|
||||
ifmax = Math.max(ifmax, shunFirstA2, shunFirstB2)
|
||||
ifmin = Math.min(ifmin, shunFirstA2, shunFirstB2)
|
||||
|
||||
const shunSecondA2 = shunData[shun][iphasic * step + 1]
|
||||
const shunSecondB2 = shunData[shun][iphasic * step + 2]
|
||||
shunshiSA.push([shunData[shun][0], shunSecondA2])
|
||||
shunshiSB.push([shunData[shun][0], shunSecondB2])
|
||||
ismax = Math.max(ismax, shunSecondA2, shunSecondB2)
|
||||
ismin = Math.min(ismin, shunSecondA2, shunSecondB2)
|
||||
break
|
||||
case 3:
|
||||
const shunFirstA3 = shunData[shun][iphasic * step + 1] * xishu
|
||||
const shunFirstB3 = shunData[shun][iphasic * step + 2] * xishu
|
||||
const shunFirstC3 = shunData[shun][iphasic * step + 3] * xishu
|
||||
shunshiFA.push([shunData[shun][0], shunFirstA3])
|
||||
shunshiFB.push([shunData[shun][0], shunFirstB3])
|
||||
shunshiFC.push([shunData[shun][0], shunFirstC3])
|
||||
ifmax = Math.max(ifmax, shunFirstA3, shunFirstB3, shunFirstC3)
|
||||
ifmin = isOpen
|
||||
? Math.min(ifmin, shunFirstA3, shunFirstC3)
|
||||
: Math.min(ifmin, shunFirstA3, shunFirstB3, shunFirstC3)
|
||||
|
||||
const shunSecondA3 = shunData[shun][iphasic * step + 1]
|
||||
const shunSecondB3 = shunData[shun][iphasic * step + 2]
|
||||
const shunSecondC3 = shunData[shun][iphasic * step + 3]
|
||||
shunshiSA.push([shunData[shun][0], shunSecondA3])
|
||||
shunshiSB.push([shunData[shun][0], shunSecondB3])
|
||||
shunshiSC.push([shunData[shun][0], shunSecondC3])
|
||||
ismax = Math.max(ismax, shunSecondA3, shunSecondB3, shunSecondC3)
|
||||
ismin = isOpen
|
||||
? Math.min(ismin, shunSecondA3, shunSecondC3)
|
||||
: Math.min(ismin, shunSecondA3, shunSecondB3, shunSecondC3)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (iphasic) {
|
||||
case 1:
|
||||
const shunFirstA = shunData[shun][iphasic * step + 1] * xishu;
|
||||
shunshiFA.push([shunData[shun][0], shunFirstA]);
|
||||
ifmax = Math.max(ifmax, shunFirstA);
|
||||
ifmin = Math.min(ifmin, shunFirstA);
|
||||
const instantF = { max: ifmax, min: ifmin }
|
||||
const instantS = { max: ismax, min: ismin }
|
||||
const shunshiF = { shunshiFA, shunshiFB, shunshiFC }
|
||||
const shunshiS = { shunshiSA, shunshiSB, shunshiSC }
|
||||
const title = { aTitle, bTitle, cTitle, unit }
|
||||
|
||||
const shunSecondA = shunData[shun][iphasic * step + 1];
|
||||
shunshiSA.push([shunData[shun][0], shunSecondA]);
|
||||
ismax = Math.max(ismax, shunSecondA);
|
||||
ismin = Math.min(ismin, shunSecondA);
|
||||
break;
|
||||
case 2:
|
||||
const shunFirstA2 = shunData[shun][iphasic * step + 1] * xishu;
|
||||
const shunFirstB2 = shunData[shun][iphasic * step + 2] * xishu;
|
||||
shunshiFA.push([shunData[shun][0], shunFirstA2]);
|
||||
shunshiFB.push([shunData[shun][0], shunFirstB2]);
|
||||
ifmax = Math.max(ifmax, shunFirstA2, shunFirstB2);
|
||||
ifmin = Math.min(ifmin, shunFirstA2, shunFirstB2);
|
||||
|
||||
const shunSecondA2 = shunData[shun][iphasic * step + 1];
|
||||
const shunSecondB2 = shunData[shun][iphasic * step + 2];
|
||||
shunshiSA.push([shunData[shun][0], shunSecondA2]);
|
||||
shunshiSB.push([shunData[shun][0], shunSecondB2]);
|
||||
ismax = Math.max(ismax, shunSecondA2, shunSecondB2);
|
||||
ismin = Math.min(ismin, shunSecondA2, shunSecondB2);
|
||||
break;
|
||||
case 3:
|
||||
const shunFirstA3 = shunData[shun][iphasic * step + 1] * xishu;
|
||||
const shunFirstB3 = shunData[shun][iphasic * step + 2] * xishu;
|
||||
const shunFirstC3 = shunData[shun][iphasic * step + 3] * xishu;
|
||||
shunshiFA.push([shunData[shun][0], shunFirstA3]);
|
||||
shunshiFB.push([shunData[shun][0], shunFirstB3]);
|
||||
shunshiFC.push([shunData[shun][0], shunFirstC3]);
|
||||
ifmax = Math.max(ifmax, shunFirstA3, shunFirstB3, shunFirstC3);
|
||||
ifmin = isOpen ? Math.min(ifmin, shunFirstA3, shunFirstC3) : Math.min(ifmin, shunFirstA3, shunFirstB3, shunFirstC3);
|
||||
|
||||
const shunSecondA3 = shunData[shun][iphasic * step + 1];
|
||||
const shunSecondB3 = shunData[shun][iphasic * step + 2];
|
||||
const shunSecondC3 = shunData[shun][iphasic * step + 3];
|
||||
shunshiSA.push([shunData[shun][0], shunSecondA3]);
|
||||
shunshiSB.push([shunData[shun][0], shunSecondB3]);
|
||||
shunshiSC.push([shunData[shun][0], shunSecondC3]);
|
||||
ismax = Math.max(ismax, shunSecondA3, shunSecondB3, shunSecondC3);
|
||||
ismin = isOpen ? Math.min(ismin, shunSecondA3, shunSecondC3) : Math.min(ismin, shunSecondA3, shunSecondB3, shunSecondC3);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return { instantF, instantS, shunshiF, shunshiS, title, unit }
|
||||
}
|
||||
|
||||
const instantF = { max: ifmax, min: ifmin };
|
||||
const instantS = { max: ismax, min: ismin };
|
||||
const shunshiF = { shunshiFA, shunshiFB, shunshiFC };
|
||||
const shunshiS = { shunshiSA, shunshiSB, shunshiSC };
|
||||
const title = { aTitle, bTitle, cTitle, unit };
|
||||
// 处理标题
|
||||
let titles = ''
|
||||
if (boxoList.systemType == 'pms') {
|
||||
titles =
|
||||
'变电站名称:' +
|
||||
boxoList.powerStationName +
|
||||
' 监测点名称:' +
|
||||
boxoList.measurementPointName +
|
||||
' 发生时刻:' +
|
||||
boxoList.startTime +
|
||||
' 残余电压:' +
|
||||
(boxoList.featureAmplitude * 100).toFixed(2) +
|
||||
'% 持续时间:' +
|
||||
boxoList.duration +
|
||||
's'
|
||||
} else if (boxoList.systemType == 'ZL') {
|
||||
titles =
|
||||
' 监测点名称:' +
|
||||
boxoList.equipmentName +
|
||||
' 发生时刻:' +
|
||||
boxoList.startTime +
|
||||
' 残余电压:' +
|
||||
boxoList.evtParamVVaDepth +
|
||||
' 持续时间:' +
|
||||
boxoList.evtParamTm +
|
||||
's'
|
||||
} else if (boxoList.systemType == 'YPT') {
|
||||
titles =
|
||||
' 监测点名称:' +
|
||||
boxoList.lineName +
|
||||
' 发生时刻:' +
|
||||
boxoList.startTime +
|
||||
' 残余电压:' +
|
||||
(boxoList.featureAmplitude * 100).toFixed(2) +
|
||||
'% 持续时间:' +
|
||||
boxoList.persistTime +
|
||||
's'
|
||||
} else {
|
||||
titles =
|
||||
'变电站名称:' +
|
||||
boxoList.subName +
|
||||
' 监测点名称:' +
|
||||
boxoList.lineName +
|
||||
' 发生时刻:' +
|
||||
boxoList.startTime +
|
||||
' 残余电压:' +
|
||||
(boxoList.featureAmplitude * 100).toFixed(2) +
|
||||
'% 持续时间:' +
|
||||
boxoList.duration +
|
||||
's'
|
||||
}
|
||||
|
||||
return { instantF, instantS, shunshiF, shunshiS, title, unit };
|
||||
};
|
||||
const iphasicValue = wp.iphasic || 1
|
||||
const picCounts = (wp.waveTitle.length - 1) / iphasicValue
|
||||
const waveDatas = []
|
||||
|
||||
// 处理标题
|
||||
let titles = '';
|
||||
if (boxoList.systemType == 'pms') {
|
||||
titles = '变电站名称:' +
|
||||
boxoList.powerStationName +
|
||||
' 监测点名称:' +
|
||||
boxoList.measurementPointName +
|
||||
' 发生时刻:' +
|
||||
boxoList.startTime +
|
||||
' 残余电压:' +
|
||||
(boxoList.featureAmplitude * 100).toFixed(2) +
|
||||
'% 持续时间:' +
|
||||
boxoList.duration +
|
||||
's';
|
||||
} else if (boxoList.systemType == 'ZL') {
|
||||
titles = ' 监测点名称:' +
|
||||
boxoList.equipmentName +
|
||||
' 发生时刻:' +
|
||||
boxoList.startTime +
|
||||
' 残余电压:' +
|
||||
boxoList.evtParamVVaDepth +
|
||||
' 持续时间:' +
|
||||
boxoList.evtParamTm +
|
||||
's';
|
||||
} else {
|
||||
titles = '变电站名称:' +
|
||||
boxoList.subName +
|
||||
' 监测点名称:' +
|
||||
boxoList.lineName +
|
||||
' 发生时刻:' +
|
||||
boxoList.startTime +
|
||||
' 残余电压:' +
|
||||
(boxoList.featureAmplitude * 100).toFixed(2) +
|
||||
'% 持续时间:' +
|
||||
boxoList.duration +
|
||||
's';
|
||||
}
|
||||
for (let i = 0; i < picCounts; i++) {
|
||||
const data = fliteWaveData(wp, i)
|
||||
waveDatas.push(data)
|
||||
}
|
||||
|
||||
const iphasicValue = wp.iphasic || 1;
|
||||
const picCounts = (wp.waveTitle.length - 1) / iphasicValue;
|
||||
const waveDatas = [];
|
||||
const time = wp.time
|
||||
const type = wp.waveType
|
||||
let severity = wp.yzd
|
||||
|
||||
for (let i = 0; i < picCounts; i++) {
|
||||
const data = fliteWaveData(wp, i);
|
||||
waveDatas.push(data);
|
||||
}
|
||||
if (severity < 0) {
|
||||
severity = '/'
|
||||
type = '/'
|
||||
}
|
||||
|
||||
const time = wp.time;
|
||||
const type = wp.waveType;
|
||||
let severity = wp.yzd;
|
||||
|
||||
if (severity < 0) {
|
||||
severity = '/';
|
||||
type = '/';
|
||||
}
|
||||
|
||||
// 将处理结果发送回主线程
|
||||
self.postMessage({
|
||||
waveDatas,
|
||||
time,
|
||||
type,
|
||||
severity,
|
||||
titles,
|
||||
iphasic: iphasicValue
|
||||
});
|
||||
});
|
||||
// 将处理结果发送回主线程
|
||||
self.postMessage({
|
||||
waveDatas,
|
||||
time,
|
||||
type,
|
||||
severity,
|
||||
titles,
|
||||
iphasic: iphasicValue
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div v-loading="loading" :element-loading-background="'rgba(122, 122, 122, 0.8)'" class="boxbx"
|
||||
style="position: relative;height: 100%;">
|
||||
<div id="boxsj" style="background: #343849c7">
|
||||
<div v-loading="loading" class="boxbx" style="position: relative; height: 100%">
|
||||
<div id="boxsj">
|
||||
<div id="shushi" :style="`height:${vh};overflow: hidden;`">
|
||||
<div class="bx" id="wave"></div>
|
||||
</div>
|
||||
@@ -14,9 +13,10 @@ import { ref, computed, onMounted, onBeforeUnmount, watch, nextTick } from 'vue'
|
||||
import html2canvas from 'html2canvas'
|
||||
import $ from 'jquery'
|
||||
import * as echarts from 'echarts'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import url from '@/assets/img/point.png'
|
||||
// 创建Worker
|
||||
let waveDataWorker: Worker | null = null;
|
||||
let waveDataWorker: Worker | null = null
|
||||
interface WaveData {
|
||||
instantF: { max: number; min: number }
|
||||
instantS: { max: number; min: number }
|
||||
@@ -42,7 +42,7 @@ interface WaveData {
|
||||
interface Props {
|
||||
value?: number
|
||||
flag?: string | number | boolean
|
||||
parentHeight?: string | number | boolean
|
||||
parentHeight?: any
|
||||
DColor?: boolean
|
||||
boxoList?: any
|
||||
wp?: any
|
||||
@@ -87,29 +87,44 @@ const myChartess4 = ref<echarts.ECharts | null>(null)
|
||||
const myChartess5 = ref<echarts.ECharts | null>(null)
|
||||
|
||||
const vh = computed(() => {
|
||||
if (props.flag == 1) {
|
||||
return '690px'
|
||||
} else if (props.parentHeight != 0) {
|
||||
if (props.parentHeight == 999) {
|
||||
return '310px'
|
||||
} else {
|
||||
return '350px'
|
||||
} else if (props.parentHeight != 0) {
|
||||
return mainHeight(props.parentHeight, 2).height
|
||||
}
|
||||
|
||||
if (props.flag == 1) {
|
||||
return mainHeight(200).height
|
||||
} else {
|
||||
return mainHeight(200, 2).height
|
||||
}
|
||||
|
||||
// if (props.flag == 1) {
|
||||
// return '690px'
|
||||
// } else if (props.parentHeight != 0) {
|
||||
// return '310px'
|
||||
// } else {
|
||||
// return '350px'
|
||||
// }
|
||||
})
|
||||
|
||||
const vw = computed(() => '100%')
|
||||
|
||||
watch(() => props.value, (newVal) => {
|
||||
if (newVal == 2) {
|
||||
initWaves()
|
||||
} else {
|
||||
$('#wave1').remove()
|
||||
initWaves()
|
||||
watch(
|
||||
() => props.value,
|
||||
newVal => {
|
||||
if (newVal == 2) {
|
||||
initWaves()
|
||||
} else {
|
||||
$('#wave1').remove()
|
||||
initWaves()
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
const zoomValue = document.body.style.getPropertyValue('zoom');
|
||||
zoom.value = 1 / (zoomValue ? parseFloat(zoomValue) : 1);
|
||||
const zoomValue = document.body.style.getPropertyValue('zoom')
|
||||
zoom.value = 1 / (zoomValue ? parseFloat(zoomValue) : 1)
|
||||
|
||||
window.addEventListener('resize', handleResize)
|
||||
nextTick(() => {
|
||||
@@ -120,27 +135,27 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
console.log('组件卸载');
|
||||
console.log('组件卸载')
|
||||
|
||||
if (waveDataWorker) {
|
||||
waveDataWorker.terminate();
|
||||
waveDataWorker = null;
|
||||
waveDataWorker.terminate()
|
||||
waveDataWorker = null
|
||||
}
|
||||
|
||||
backbxlb();
|
||||
window.removeEventListener('resize', handleResize);
|
||||
backbxlb()
|
||||
window.removeEventListener('resize', handleResize)
|
||||
})
|
||||
|
||||
const handleResize = () => {
|
||||
const zoomValue = document.body.style.getPropertyValue('zoom');
|
||||
zoom.value = 1 / (zoomValue ? parseFloat(zoomValue) : 1);
|
||||
const zoomValue = document.body.style.getPropertyValue('zoom')
|
||||
zoom.value = 1 / (zoomValue ? parseFloat(zoomValue) : 1)
|
||||
}
|
||||
|
||||
const download = () => {
|
||||
const boxsj = document.getElementById('boxsj')
|
||||
if (boxsj) {
|
||||
html2canvas(boxsj, {
|
||||
scale: 2,
|
||||
scale: 2
|
||||
}).then(function (canvas) {
|
||||
const creatIMg = document.createElement('a')
|
||||
creatIMg.download = '瞬间波形.png'
|
||||
@@ -170,49 +185,56 @@ const waveData = (instantF: any, instantS: any, shunshiF: any, shunshiS: any, ti
|
||||
// 在组件中修改initWaves函数
|
||||
const initWaves = () => {
|
||||
if (props.wp) {
|
||||
loading.value = true;
|
||||
loading.value = true
|
||||
iphasic.value = props.wp.iphasic || 1
|
||||
// 使用Web Worker处理数据
|
||||
if (!waveDataWorker) {
|
||||
waveDataWorker = new Worker(new URL('./shuWorker.js', import.meta.url));
|
||||
waveDataWorker = new Worker(new URL('./shuWorker.js', import.meta.url))
|
||||
|
||||
waveDataWorker.onmessage = function (e) {
|
||||
const data = e.data;
|
||||
const data = e.data
|
||||
|
||||
titles.value = data.titles;
|
||||
iphasic.value = data.iphasic;
|
||||
time.value = data.time;
|
||||
type.value = data.type;
|
||||
severity.value = data.severity;
|
||||
titles.value = data.titles
|
||||
iphasic.value = data.iphasic
|
||||
time.value = data.time
|
||||
type.value = data.type
|
||||
severity.value = data.severity
|
||||
|
||||
initWave(data.waveDatas, data.time, data.type, data.severity, isOpen.value);
|
||||
|
||||
loading.value = false;
|
||||
};
|
||||
initWave(data.waveDatas, data.time, data.type, data.severity, isOpen.value)
|
||||
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
waveDataWorker.onerror = function (error) {
|
||||
console.error('Worker error:', error);
|
||||
loading.value = false;
|
||||
console.error('Worker error:', error)
|
||||
loading.value = false
|
||||
// 备用方案:在主线程处理数据
|
||||
// processDataInMainThread();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// 发送数据到Worker
|
||||
waveDataWorker.postMessage(JSON.stringify({
|
||||
wp: props.wp,
|
||||
value: props.value,
|
||||
iphasic: iphasic.value,
|
||||
isOpen: isOpen.value,
|
||||
boxoList: props.boxoList
|
||||
}));
|
||||
waveDataWorker.postMessage(
|
||||
JSON.stringify({
|
||||
wp: props.wp,
|
||||
value: props.value,
|
||||
iphasic: iphasic.value,
|
||||
isOpen: isOpen.value,
|
||||
boxoList: props.boxoList
|
||||
})
|
||||
)
|
||||
} else {
|
||||
initWave(null, null, null, null, null);
|
||||
initWave(null, null, null, null, null)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const initWave = (waveDatas: WaveData[] | null, time: string | null, type: string | null, severity: string | null, isOpen: boolean | null) => {
|
||||
const initWave = (
|
||||
waveDatas: WaveData[] | null,
|
||||
time: string | null,
|
||||
type: string | null,
|
||||
severity: string | null,
|
||||
isOpen: boolean | null
|
||||
) => {
|
||||
$('div.bx1').remove()
|
||||
|
||||
let picHeight = vh.value
|
||||
@@ -221,9 +243,14 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
let cu: number[][] = []
|
||||
let titleText = ''
|
||||
let unit = ''
|
||||
let max: any = 0, min: any = 0
|
||||
let a: string | null = null, b: string | null = null, c: string | null = null
|
||||
let adata: number[][] = [], bdata: number[][] = [], cdata: number[][] = []
|
||||
let max: any = 0,
|
||||
min: any = 0
|
||||
let a: string | null = null,
|
||||
b: string | null = null,
|
||||
c: string | null = null
|
||||
let adata: number[][] = [],
|
||||
bdata: number[][] = [],
|
||||
cdata: number[][] = []
|
||||
const colors: string[] = []
|
||||
|
||||
if (!waveDatas) {
|
||||
@@ -249,7 +276,7 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
min = waveDatas[0].instantS.min
|
||||
adata = waveDatas[0].shunshiS.shunshiSA
|
||||
}
|
||||
colors.push('#DAA520', '#fff', '#fff')
|
||||
colors.push('#DAA520', '#000', '#000')
|
||||
break
|
||||
case 2:
|
||||
a = waveDatas[0].title.aTitle
|
||||
@@ -267,7 +294,7 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
adata = waveDatas[0].shunshiS.shunshiSA
|
||||
bdata = waveDatas[0].shunshiS.shunshiSB
|
||||
}
|
||||
colors.push('#DAA520', '#2E8B57', '#fff')
|
||||
colors.push('#DAA520', '#2E8B57', '#000')
|
||||
break
|
||||
case 3:
|
||||
a = waveDatas[0].title.aTitle
|
||||
@@ -307,14 +334,34 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
$(`#${waveId}`).css('height', picHeight).css('width', vw.value)
|
||||
}
|
||||
} else {
|
||||
titleText = `变电站名称:${subName.value} 监测点名称:${lineName.value} 发生时刻:${time} 残余电压:${(Number(eventValue.value) * 1).toFixed(0)}% 持续时间:${persistTime.value}s`
|
||||
titleText = `变电站名称:${subName.value} 监测点名称:${lineName.value} 发生时刻:${time} 残余电压:${(
|
||||
Number(eventValue.value) * 1
|
||||
).toFixed(0)}% 持续时间:${persistTime.value}s`
|
||||
}
|
||||
|
||||
const wave = document.getElementById('wave')
|
||||
if (!wave) return
|
||||
|
||||
const myChartes = echarts.init(wave)
|
||||
const echartsColor = { WordColor: "#fff", thread: "#fff", FigureColor: ["#07CCCA ", "#00BFF5", "#FFBF00", "#77DA63", "#D5FF6B", "#Ff6600", "#FF9100", "#5B6E96", "#66FFCC", "#B3B3B3", "#FF00FF", "#CC00FF", "#FF9999"] }
|
||||
const echartsColor = {
|
||||
WordColor: '#000',
|
||||
thread: '#000',
|
||||
FigureColor: [
|
||||
'#07CCCA ',
|
||||
'#00BFF5',
|
||||
'#FFBF00',
|
||||
'#77DA63',
|
||||
'#D5FF6B',
|
||||
'#Ff6600',
|
||||
'#FF9100',
|
||||
'#5B6E96',
|
||||
'#66FFCC',
|
||||
'#B3B3B3',
|
||||
'#FF00FF',
|
||||
'#CC00FF',
|
||||
'#FF9999'
|
||||
]
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
wave.style.width = '100%'
|
||||
@@ -335,7 +382,12 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
let tips = '时刻:' + params[0].data[0] + '</br/>'
|
||||
for (let i = 0; i < params.length; i++) {
|
||||
if (params[i].seriesName != '暂降触发点') {
|
||||
tips += params[i].marker + params[i].seriesName + ':' + (params[i].value[1] - 0).toFixed(2) + '<br/>'
|
||||
tips +=
|
||||
params[i].marker +
|
||||
params[i].seriesName +
|
||||
':' +
|
||||
(params[i].value[1] - 0).toFixed(2) +
|
||||
'<br/>'
|
||||
}
|
||||
}
|
||||
return tips
|
||||
@@ -345,7 +397,7 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
fontStyle: 'normal',
|
||||
opacity: 0.35,
|
||||
fontSize: 14
|
||||
},
|
||||
},
|
||||
backgroundColor: 'rgba(0,0,0,0.55)',
|
||||
borderWidth: 0
|
||||
},
|
||||
@@ -353,8 +405,8 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
left: 'center',
|
||||
text: titleText,
|
||||
textStyle: {
|
||||
fontSize: '0.8rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor
|
||||
fontSize: '16px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
@@ -364,8 +416,8 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
enabled: true,
|
||||
itemDistance: 5,
|
||||
textStyle: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor,
|
||||
fontSize: 12,
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor,
|
||||
rich: { a: { verticalAlign: 'middle' } },
|
||||
padding: [0, 0, 0, 0]
|
||||
}
|
||||
@@ -390,24 +442,24 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
title: {
|
||||
text: 'ms',
|
||||
textStyle: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor
|
||||
},
|
||||
enabled: true,
|
||||
align: 'high'
|
||||
},
|
||||
splitLine: { show: false },
|
||||
nameTextStyle: { fontSize: '0.6rem' },
|
||||
nameTextStyle: { fontSize: '12px' },
|
||||
axisTick: { alignWithLabel: true },
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: props.DColor ? '#fff' : echartsColor.thread
|
||||
color: props.DColor ? '#000' : echartsColor.thread
|
||||
},
|
||||
onZero: false
|
||||
},
|
||||
axisLabel: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor,
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor,
|
||||
formatter: function (value: number) {
|
||||
if (valA.value != (value - 0).toFixed(0)) {
|
||||
valA.value = Number((value - 0).toFixed(0))
|
||||
@@ -433,26 +485,26 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
min: min.toFixed(2) > 0 ? min.toFixed(2) - min.toFixed(2) * 0.1 : min.toFixed(2) * 1.1,
|
||||
opposite: false,
|
||||
nameTextStyle: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: props.DColor ? '#fff' : echartsColor.thread
|
||||
color: props.DColor ? '#000' : echartsColor.thread
|
||||
},
|
||||
onZero: false
|
||||
},
|
||||
axisLabel: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor,
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor,
|
||||
formatter: function (value: number) {
|
||||
return (value - 0).toFixed(2)
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: [props.DColor ? '#fff' : echartsColor.thread],
|
||||
color: [props.DColor ? '#000' : echartsColor.thread],
|
||||
type: 'dashed',
|
||||
opacity: 0.5
|
||||
}
|
||||
@@ -460,9 +512,9 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
},
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '2.8%',
|
||||
right: '45px',
|
||||
bottom: '40px',
|
||||
top: '70px',
|
||||
top: '60px',
|
||||
containLabel: true
|
||||
},
|
||||
dataZoom: [
|
||||
@@ -537,23 +589,36 @@ const initWave = (waveDatas: WaveData[] | null, time: string | null, type: strin
|
||||
}
|
||||
}
|
||||
|
||||
const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show: boolean, myChartes1: echarts.ECharts, title: string) => {
|
||||
const drawPics = (
|
||||
waveDataTemp: WaveData,
|
||||
picHeight: string,
|
||||
step: number,
|
||||
show: boolean,
|
||||
myChartes1: echarts.ECharts,
|
||||
title: string
|
||||
) => {
|
||||
step = step + 1
|
||||
const waveId = 'wave' + step
|
||||
let a: string | null = null, b: string | null = null, c: string | null = null
|
||||
let max: any = 0, min: any = 0, unit = ''
|
||||
let adata: number[][] = [], bdata: number[][] = [], cdata: number[][] = []
|
||||
let a: string | null = null,
|
||||
b: string | null = null,
|
||||
c: string | null = null
|
||||
let max: any = 0,
|
||||
min: any = 0,
|
||||
unit = ''
|
||||
let adata: number[][] = [],
|
||||
bdata: number[][] = [],
|
||||
cdata: number[][] = []
|
||||
const colors: string[] = []
|
||||
|
||||
switch (iphasic.value) {
|
||||
case 1:
|
||||
a = waveDataTemp.title.aTitle
|
||||
colors.push('#DAA520', '#fff', '#fff')
|
||||
colors.push('#DAA520', '#000', '#000')
|
||||
break
|
||||
case 2:
|
||||
a = waveDataTemp.title.aTitle
|
||||
b = waveDataTemp.title.bTitle
|
||||
colors.push('#DAA520', '#2E8B57', '#fff')
|
||||
colors.push('#DAA520', '#2E8B57', '#000')
|
||||
break
|
||||
case 3:
|
||||
a = waveDataTemp.title.aTitle
|
||||
@@ -612,7 +677,25 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
if (!waveIds) return
|
||||
|
||||
const myChartes = echarts.init(waveIds)
|
||||
const echartsColor = { WordColor: "#fff", thread: "#fff", FigureColor: ["#07CCCA ", "#00BFF5", "#FFBF00", "#77DA63", "#D5FF6B", "#Ff6600", "#FF9100", "#5B6E96", "#66FFCC", "#B3B3B3", "#FF00FF", "#CC00FF", "#FF9999"] }
|
||||
const echartsColor = {
|
||||
WordColor: '#000',
|
||||
thread: '#000',
|
||||
FigureColor: [
|
||||
'#07CCCA ',
|
||||
'#00BFF5',
|
||||
'#FFBF00',
|
||||
'#77DA63',
|
||||
'#D5FF6B',
|
||||
'#Ff6600',
|
||||
'#FF9100',
|
||||
'#5B6E96',
|
||||
'#66FFCC',
|
||||
'#B3B3B3',
|
||||
'#FF00FF',
|
||||
'#CC00FF',
|
||||
'#FF9999'
|
||||
]
|
||||
}
|
||||
|
||||
const option = {
|
||||
tooltip: {
|
||||
@@ -638,10 +721,10 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
},
|
||||
title: {
|
||||
left: 'center',
|
||||
text: '',//titlename || title,
|
||||
text: '', //titlename || title,
|
||||
textStyle: {
|
||||
fontSize: '0.8rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor
|
||||
fontSize: '16px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
@@ -651,8 +734,8 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
enabled: true,
|
||||
itemDistance: 5,
|
||||
textStyle: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor,
|
||||
fontSize: 12,
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor,
|
||||
rich: { a: { verticalAlign: 'middle' } },
|
||||
padding: [0, 0, 0, 0]
|
||||
}
|
||||
@@ -666,8 +749,8 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
title: {
|
||||
text: 'ms',
|
||||
textStyle: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor
|
||||
},
|
||||
enabled: true,
|
||||
align: 'high'
|
||||
@@ -676,14 +759,14 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
axisTick: { alignWithLabel: true },
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: props.DColor ? '#fff' : echartsColor.thread
|
||||
color: props.DColor ? '#000' : echartsColor.thread
|
||||
},
|
||||
onZero: false
|
||||
},
|
||||
nameTextStyle: { fontSize: '0.6rem' },
|
||||
nameTextStyle: { fontSize: '12px' },
|
||||
axisLabel: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor,
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor,
|
||||
formatter: function (value: number) {
|
||||
if (valB.value != (value - 0).toFixed(0)) {
|
||||
valB.value = Number((value - 0).toFixed(0))
|
||||
@@ -709,26 +792,26 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
min: min.toFixed(2) > 0 ? min.toFixed(2) - min.toFixed(2) * 0.1 : min.toFixed(2) * 1.1,
|
||||
opposite: false,
|
||||
nameTextStyle: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: props.DColor ? '#fff' : echartsColor.thread
|
||||
color: props.DColor ? '#000' : echartsColor.thread
|
||||
},
|
||||
onZero: false
|
||||
},
|
||||
axisLabel: {
|
||||
fontSize: '0.6rem',
|
||||
color: props.DColor ? '#fff' : echartsColor.WordColor,
|
||||
fontSize: '12px',
|
||||
color: props.DColor ? '#000' : echartsColor.WordColor,
|
||||
formatter: function (value: number) {
|
||||
return (value - 0).toFixed(2)
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: [props.DColor ? '#fff' : echartsColor.thread],
|
||||
color: [props.DColor ? '#000' : echartsColor.thread],
|
||||
type: 'dashed',
|
||||
opacity: 0.5
|
||||
}
|
||||
@@ -736,9 +819,9 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
},
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '2.8%',
|
||||
right: '45px',
|
||||
bottom: '40px',
|
||||
top: '70px',
|
||||
top: '60px',
|
||||
containLabel: true
|
||||
},
|
||||
dataZoom: [
|
||||
@@ -793,11 +876,21 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
myChartes.setOption(option)
|
||||
|
||||
switch (step) {
|
||||
case 1: myChartess1.value = myChartes; break
|
||||
case 2: myChartess2.value = myChartes; break
|
||||
case 3: myChartess3.value = myChartes; break
|
||||
case 4: myChartess4.value = myChartes; break
|
||||
case 5: myChartess5.value = myChartes; break
|
||||
case 1:
|
||||
myChartess1.value = myChartes
|
||||
break
|
||||
case 2:
|
||||
myChartess2.value = myChartes
|
||||
break
|
||||
case 3:
|
||||
myChartess3.value = myChartes
|
||||
break
|
||||
case 4:
|
||||
myChartess4.value = myChartes
|
||||
break
|
||||
case 5:
|
||||
myChartess5.value = myChartes
|
||||
break
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
@@ -810,7 +903,14 @@ const drawPics = (waveDataTemp: WaveData, picHeight: string, step: number, show:
|
||||
|
||||
const backbxlb = () => {
|
||||
waveDatas.value = []
|
||||
const charts = [myChartess.value, myChartess1.value, myChartess2.value, myChartess3.value, myChartess4.value, myChartess5.value]
|
||||
const charts = [
|
||||
myChartess.value,
|
||||
myChartess1.value,
|
||||
myChartess2.value,
|
||||
myChartess3.value,
|
||||
myChartess4.value,
|
||||
myChartess5.value
|
||||
]
|
||||
|
||||
charts.forEach(chart => {
|
||||
if (chart) {
|
||||
@@ -826,13 +926,11 @@ const backbxlb = () => {
|
||||
myChartess5.value = null
|
||||
|
||||
// echarts.disconnect(charts.filter(Boolean) as echarts.ECharts[])
|
||||
charts
|
||||
.filter(Boolean)
|
||||
.forEach(chart => {
|
||||
if (chart && typeof chart.dispose === 'function') {
|
||||
chart.dispose();
|
||||
}
|
||||
});
|
||||
charts.filter(Boolean).forEach(chart => {
|
||||
if (chart && typeof chart.dispose === 'function') {
|
||||
chart.dispose()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const getMax = (temp: number, tempA: number, tempB: number, tempC: number): number => {
|
||||
@@ -860,4 +958,4 @@ const getMinOpen = (temp: number, tempA: number, tempB: number): number => {
|
||||
temp = temp < tempB ? temp : tempB
|
||||
return temp
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -88,6 +88,7 @@ interface Props {
|
||||
theCurrentTime?: boolean //控制时间前3天展示上个月时间
|
||||
showReset?: boolean //是否显示重置
|
||||
showExport?: boolean //导出控制
|
||||
timeCacheFlag?: boolean //是否取缓存时间
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
@@ -97,7 +98,8 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
nextFlag: false,
|
||||
theCurrentTime: true,
|
||||
showReset: true,
|
||||
showExport: false
|
||||
showExport: false,
|
||||
timeCacheFlag: true
|
||||
})
|
||||
|
||||
// 处理 DatePicker 值变化事件
|
||||
@@ -134,7 +136,7 @@ onMounted(() => {
|
||||
if (props.datePicker && datePickerRef.value) {
|
||||
// 从缓存中获取值并设置
|
||||
const cached = timeCacheStore.getCache(route.path)
|
||||
if (cached) {
|
||||
if (props.timeCacheFlag && cached) {
|
||||
if (cached.interval !== undefined) {
|
||||
datePickerRef.value.setInterval(cached.interval)
|
||||
}
|
||||
|
||||
@@ -67,7 +67,8 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
|
||||
config.url == '/system-boot/file/upload' ||
|
||||
config.url == '/harmonic-boot/grid/getAssessOverview' ||
|
||||
config.url == '/harmonic-boot/gridDiagram/getGridDiagramAreaData' ||
|
||||
config.url == '/cs-device-boot/csline/list'
|
||||
config.url == '/cs-device-boot/csline/list' ||
|
||||
config.url == '/cs-harmonic-boot/pqSensitiveUser/getListByIds'
|
||||
)
|
||||
)
|
||||
removePending(config)
|
||||
|
||||
@@ -1,184 +1,190 @@
|
||||
<!-- 暂态事件-波形分析组件 -->
|
||||
<template>
|
||||
<div class="home">
|
||||
<div class="home_header">
|
||||
<!-- <el-form-item label="值类型选择">
|
||||
<el-select @change="changeView" v-model.trim="value" placeholder="请选择值类型">
|
||||
<el-option
|
||||
v-for="(item, index) in options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-radio-group v-model.trim="theTypeOfValue" @change="changeView">
|
||||
<el-radio-button label="一次值" :value="1" />
|
||||
<el-radio-button label="二次值" :value="2" />
|
||||
|
||||
</el-radio-group>
|
||||
|
||||
<el-button @click="handleBack" :icon="Back">返回</el-button>
|
||||
|
||||
</div>
|
||||
<el-tabs class="home_body" type="border-card" v-model.trim="activeName1" @tab-click="handleClick"
|
||||
v-loading="loading">
|
||||
|
||||
<el-tab-pane label="瞬时波形" name="ssbx" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
||||
<shushiboxi v-if="isWp && wp && activeName == 'ssbx' && showBoxi" :value="value" :boxoList="boxoList"
|
||||
:parentHeight="parentHeight" :wp="wp">
|
||||
</shushiboxi>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="RMS波形" name="rmsbx" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
||||
<rmsboxi v-if="isWp && wp && activeName == 'rmsbx' && showBoxi" :value="value" :boxoList="boxoList"
|
||||
:parentHeight="parentHeight" :wp="wp">
|
||||
</rmsboxi>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, reactive, defineExpose, watch, defineEmits } from 'vue'
|
||||
import { VxeGridProps, VxeGridPropTypes } from 'vxe-table'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import shushiboxi from '@/components/echarts/shushiboxi.vue'
|
||||
import rmsboxi from '@/components/echarts/rmsboxi.vue'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { Platform, TrendCharts, DataLine, Back } from '@element-plus/icons-vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
const props = defineProps(['wp'])
|
||||
const searchForm = ref({
|
||||
type: 0
|
||||
})
|
||||
const emit = defineEmits(['handleHideCharts'])
|
||||
const parentHeight = ref(0)
|
||||
const loading = ref(false)
|
||||
const tableList: any = ref([])
|
||||
for (let i = 0; i < 300; i++) {
|
||||
tableList.value.push({
|
||||
name: i + 1,
|
||||
value: Math.floor(Math.random() * 101)
|
||||
})
|
||||
}
|
||||
interface RowVO {
|
||||
[key: string]: any
|
||||
}
|
||||
//谐波电压含有率
|
||||
const gridOptions = ref<VxeGridProps<RowVO>>({
|
||||
border: true,
|
||||
showOverflow: true,
|
||||
showHeader: false,
|
||||
columns: [],
|
||||
data: [],
|
||||
columnConfig: {
|
||||
resizable: true
|
||||
},
|
||||
align: 'center'
|
||||
})
|
||||
gridOptions.value = { ...defaultAttribute, ...gridOptions.value }
|
||||
|
||||
const yAxisUnit: any = ref('')
|
||||
|
||||
const echartsData1: any = ref([]),
|
||||
echartsData2: any = ref([]),
|
||||
echartsData3: any = ref([]),
|
||||
barCharts1 = ref(),
|
||||
barCharts2 = ref(),
|
||||
barCharts3 = ref()
|
||||
|
||||
const view = ref(true)
|
||||
const view2 = ref(false)
|
||||
const showBoxi = ref(true)
|
||||
const activeName1 = ref('ssbx')
|
||||
const activeName = ref('ssbx')
|
||||
const wp = ref({})
|
||||
const theTypeOfValue = ref(1)
|
||||
const value = ref(1)
|
||||
|
||||
|
||||
const isWp = ref(false)
|
||||
const boxoList: any = ref([])
|
||||
const getWpData = (val: any, list: any) => {
|
||||
wp.value = val
|
||||
isWp.value = true
|
||||
boxoList.value = list
|
||||
|
||||
console.log(wp.value, val, 'ggggghhhh')
|
||||
}
|
||||
const changeView = () => {
|
||||
showBoxi.value = false
|
||||
loading.value = true
|
||||
setTimeout(() => {
|
||||
value.value = theTypeOfValue.value
|
||||
showBoxi.value = true
|
||||
}, 500)
|
||||
setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 1500)
|
||||
}
|
||||
const bxecharts: any = ref(mainHeight(190).height as any)
|
||||
|
||||
const handleClick = (tab: any, event: any) => {
|
||||
loading.value = true
|
||||
setTimeout(() => {
|
||||
activeName.value = tab.paneName
|
||||
}, 500)
|
||||
setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 1500)
|
||||
}
|
||||
const handleBack = () => {
|
||||
emit('handleHideCharts')
|
||||
}
|
||||
const setHeight = (h: any, vh: any) => {
|
||||
if (h != false) {
|
||||
parentHeight.value = h
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
bxecharts.value = mainHeight(vh).height
|
||||
}, 100)
|
||||
}
|
||||
onMounted(() => { })
|
||||
defineExpose({ getWpData, setHeight })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// .tab_info {
|
||||
// width: 100%;
|
||||
// height: calc(100vh - 450px);
|
||||
|
||||
// // overflow: auto;
|
||||
// // padding-bottom: 20px;
|
||||
// .charts {
|
||||
// width: 100%;
|
||||
// margin-top: 10px;
|
||||
// height: calc(100vh - 450px);
|
||||
// }
|
||||
// }
|
||||
|
||||
.home {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
.home_header {
|
||||
|
||||
height: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.el-select {
|
||||
width: 200px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.home_body {
|
||||
// margin-top: 20px;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<!-- 暂态事件-波形分析组件 -->
|
||||
<template>
|
||||
<div class="home">
|
||||
<div class="home_header">
|
||||
<!-- <el-form-item label="值类型选择">
|
||||
<el-select @change="changeView" v-model.trim="value" placeholder="请选择值类型">
|
||||
<el-option
|
||||
v-for="(item, index) in options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-radio-group v-model.trim="theTypeOfValue" @change="changeView">
|
||||
<el-radio-button label="一次值" :value="1" />
|
||||
<el-radio-button label="二次值" :value="2" />
|
||||
</el-radio-group>
|
||||
|
||||
<el-button @click="handleBack" :icon="Back">返回</el-button>
|
||||
</div>
|
||||
<el-tabs
|
||||
class="home_body"
|
||||
type="border-card"
|
||||
v-model.trim="activeName1"
|
||||
@tab-click="handleClick"
|
||||
v-loading="loading"
|
||||
>
|
||||
<el-tab-pane label="瞬时波形" name="ssbx" :style="'height:' + bxecharts + ';overflow-y: auto;'">
|
||||
<shushiboxi
|
||||
v-if="isWp && wp && activeName == 'ssbx' && showBoxi"
|
||||
:value="value"
|
||||
:boxoList="boxoList"
|
||||
:parentHeight="parentHeight"
|
||||
:wp="wp"
|
||||
></shushiboxi>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="RMS波形" name="rmsbx" :style="'height:' + bxecharts + ';overflow-y: auto;'">
|
||||
<rmsboxi
|
||||
v-if="isWp && wp && activeName == 'rmsbx' && showBoxi"
|
||||
:value="value"
|
||||
:boxoList="boxoList"
|
||||
:parentHeight="parentHeight"
|
||||
:wp="wp"
|
||||
></rmsboxi>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, reactive, defineExpose, watch, defineEmits } from 'vue'
|
||||
import { VxeGridProps, VxeGridPropTypes } from 'vxe-table'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import shushiboxi from '@/components/echarts/shushiboxi.vue'
|
||||
import rmsboxi from '@/components/echarts/rmsboxi.vue'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { Platform, TrendCharts, DataLine, Back } from '@element-plus/icons-vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
const props = defineProps(['wp'])
|
||||
const searchForm = ref({
|
||||
type: 0
|
||||
})
|
||||
const emit = defineEmits(['handleHideCharts'])
|
||||
const parentHeight = ref(0)
|
||||
const loading = ref(false)
|
||||
const tableList: any = ref([])
|
||||
for (let i = 0; i < 300; i++) {
|
||||
tableList.value.push({
|
||||
name: i + 1,
|
||||
value: Math.floor(Math.random() * 101)
|
||||
})
|
||||
}
|
||||
interface RowVO {
|
||||
[key: string]: any
|
||||
}
|
||||
//谐波电压含有率
|
||||
const gridOptions = ref<VxeGridProps<RowVO>>({
|
||||
border: true,
|
||||
showOverflow: true,
|
||||
showHeader: false,
|
||||
columns: [],
|
||||
data: [],
|
||||
columnConfig: {
|
||||
resizable: true
|
||||
},
|
||||
align: 'center'
|
||||
})
|
||||
gridOptions.value = { ...defaultAttribute, ...gridOptions.value }
|
||||
|
||||
const yAxisUnit: any = ref('')
|
||||
|
||||
const echartsData1: any = ref([]),
|
||||
echartsData2: any = ref([]),
|
||||
echartsData3: any = ref([]),
|
||||
barCharts1 = ref(),
|
||||
barCharts2 = ref(),
|
||||
barCharts3 = ref()
|
||||
|
||||
const view = ref(true)
|
||||
const view2 = ref(false)
|
||||
const showBoxi = ref(true)
|
||||
const activeName1 = ref('ssbx')
|
||||
const activeName = ref('ssbx')
|
||||
const wp = ref({})
|
||||
const theTypeOfValue = ref(1)
|
||||
const value = ref(1)
|
||||
|
||||
const isWp = ref(false)
|
||||
const boxoList: any = ref([])
|
||||
const getWpData = (val: any, list: any) => {
|
||||
wp.value = val
|
||||
isWp.value = true
|
||||
boxoList.value = list
|
||||
}
|
||||
const changeView = () => {
|
||||
showBoxi.value = false
|
||||
loading.value = true
|
||||
setTimeout(() => {
|
||||
value.value = theTypeOfValue.value
|
||||
showBoxi.value = true
|
||||
}, 500)
|
||||
setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 1500)
|
||||
}
|
||||
const bxecharts: any = ref(mainHeight(190).height as any)
|
||||
|
||||
const handleClick = (tab: any, event: any) => {
|
||||
loading.value = true
|
||||
setTimeout(() => {
|
||||
activeName.value = tab.paneName
|
||||
}, 500)
|
||||
setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 1500)
|
||||
}
|
||||
const handleBack = () => {
|
||||
emit('handleHideCharts')
|
||||
}
|
||||
const setHeight = (h: any, vh: any, num = 1) => {
|
||||
if (h != false) {
|
||||
parentHeight.value = h
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
bxecharts.value = mainHeight(vh,num).height
|
||||
}, 100)
|
||||
}
|
||||
onMounted(() => {})
|
||||
defineExpose({ getWpData, setHeight })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// .tab_info {
|
||||
// width: 100%;
|
||||
// height: calc(100vh - 450px);
|
||||
|
||||
// // overflow: auto;
|
||||
// // padding-bottom: 20px;
|
||||
// .charts {
|
||||
// width: 100%;
|
||||
// margin-top: 10px;
|
||||
// height: calc(100vh - 450px);
|
||||
// }
|
||||
// }
|
||||
|
||||
.home {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
.home_header {
|
||||
height: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.el-select {
|
||||
width: 200px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.home_body {
|
||||
// margin-top: 20px;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,8 +3,12 @@
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="项目名称">
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
||||
placeholder="请输入项目名称"></el-input>
|
||||
<el-input
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
v-model.trim="tableStore.table.params.searchValue"
|
||||
placeholder="请输入项目名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
@@ -12,45 +16,75 @@
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!-- <Table ref="tableRef" /> -->
|
||||
<div style="overflow-x: hidden; overflow-y: scroll;padding: 0 10px;" v-loading="tableStore.table.loading"
|
||||
:style="{ height: tableStore.table.height }">
|
||||
<div
|
||||
style="overflow-x: hidden; overflow-y: scroll; padding: 0 10px"
|
||||
v-loading="tableStore.table.loading"
|
||||
:style="{ height: tableStore.table.height }"
|
||||
>
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="6" v-for="item in tableStore.table.data" :key="item.id" class="mt10">
|
||||
<el-card class="box-card" @click="querdata(item)" shadow="hover">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="display: flex;align-items: center">{{ item.name }}
|
||||
<span style="display: flex; align-items: center">
|
||||
{{ item.name }}
|
||||
|
||||
<el-tooltip class="item" effect="dark" content="修改项目" placement="top">
|
||||
<Edit style="margin-left: 5px;width: 16px;" class=" xiaoshou color"
|
||||
@click="editd(item)" />
|
||||
</el-tooltip></span>
|
||||
<div style="display: flex;justify-content: end;">
|
||||
<el-button class="color" icon="el-icon-Share" style="padding: 3px 0" type="text"
|
||||
@click="Aclick(item)">设计</el-button>
|
||||
<Edit
|
||||
style="margin-left: 5px; width: 16px"
|
||||
class="xiaoshou color"
|
||||
@click="editd(item)"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</span>
|
||||
<div style="display: flex; justify-content: end">
|
||||
<el-button
|
||||
class="color"
|
||||
icon="el-icon-Share"
|
||||
style="padding: 3px 0"
|
||||
type="text"
|
||||
@click="Aclick(item)"
|
||||
>
|
||||
设计
|
||||
</el-button>
|
||||
<!-- <el-button icon="el-icon-share" style="padding: 3px 0; color: green"
|
||||
type="text" @click="shejid(item)">设计</el-button> -->
|
||||
<!-- <el-button icon="el-icon-edit" style="padding: 3px 0; color: blue" type="text"
|
||||
@click="shejid(item)">编辑</el-button> -->
|
||||
<el-button icon="el-icon-Delete" style="padding: 3px 0; color: red" type="text"
|
||||
@click="deleted(item)">删除</el-button>
|
||||
<el-button
|
||||
icon="el-icon-Delete"
|
||||
style="padding: 3px 0; color: red"
|
||||
type="text"
|
||||
@click="deleted(item)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<img v-if="item.fileContent" :src="item.fileContent" class="image xiaoshou" @click="imgData(item)" />
|
||||
<el-empty v-else description="暂无设计" style="height: 220px;"/>
|
||||
<img
|
||||
v-if="item.fileContent"
|
||||
:src="item.fileContent"
|
||||
class="image xiaoshou"
|
||||
@click="imgData(item)"
|
||||
/>
|
||||
<el-empty v-else description="暂无设计" style="height: 220px" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="table-pagination">
|
||||
<el-pagination :currentPage="tableStore.table.params!.pageNum"
|
||||
:page-size="tableStore.table.params!.pageSize" :page-sizes="[10, 20, 50, 100]" background
|
||||
:layout="'sizes,total, ->, prev, pager, next, jumper'" :total="tableStore.table.total"
|
||||
@size-change="onTableSizeChange" @current-change="onTableCurrentChange"></el-pagination>
|
||||
<el-pagination
|
||||
:currentPage="tableStore.table.params!.pageNum"
|
||||
:page-size="tableStore.table.params!.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
background
|
||||
:layout="'sizes,total, ->, prev, pager, next, jumper'"
|
||||
:total="tableStore.table.total"
|
||||
@size-change="onTableSizeChange"
|
||||
@current-change="onTableCurrentChange"
|
||||
></el-pagination>
|
||||
</div>
|
||||
|
||||
<popup ref="popupRef" @submit="tableStore.index()" />
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -61,9 +95,12 @@ import TableStore from '@/utils/tableStore'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { deleteTopoTemplate, uploadTopo } from '@/api/cs-device-boot/topologyTemplate'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { audit, add } from '@/api/cs-harmonic-boot/mxgraph';
|
||||
import { audit, add } from '@/api/cs-harmonic-boot/mxgraph'
|
||||
import { Edit } from '@element-plus/icons-vue'
|
||||
import popup from './components/popup.vue'
|
||||
|
||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'ypt'
|
||||
|
||||
defineOptions({
|
||||
name: 'mxgraph/graph-list'
|
||||
})
|
||||
@@ -78,11 +115,8 @@ const tableStore = new TableStore({
|
||||
url: '/cs-harmonic-boot/csconfiguration/queryPage',
|
||||
method: 'POST',
|
||||
publicHeight: 60,
|
||||
column: [
|
||||
],
|
||||
loadCallback: () => {
|
||||
|
||||
}
|
||||
column: [],
|
||||
loadCallback: () => {}
|
||||
})
|
||||
provide('tableStore', tableStore)
|
||||
tableStore.table.params.searchValue = ''
|
||||
@@ -93,12 +127,11 @@ onMounted(() => {
|
||||
})
|
||||
// 查询
|
||||
const onSubmitadd = () => {
|
||||
|
||||
popupRef.value.open({
|
||||
title: '新增项目'
|
||||
})
|
||||
}
|
||||
const querdata = (e: any) => { }
|
||||
const querdata = (e: any) => {}
|
||||
const editd = (e: any) => {
|
||||
popupRef.value.open({
|
||||
title: '修改项目',
|
||||
@@ -107,45 +140,48 @@ const editd = (e: any) => {
|
||||
}
|
||||
// 设计
|
||||
const Aclick = (e: any) => {
|
||||
window.open(window.location.origin + `/zutai/?id=${e.id}&&name=${e.name}&&preview=false&&graphicDisplay=zl`)
|
||||
// window.open('http://192.168.1.128:4001' + `/zutai/?id=${e.id}&&name=${e.name}&&preview=false&&graphicDisplay=zl`)
|
||||
|
||||
//window.open(window.location.origin + `/zutai/?id=${e.id}&&name=${e.name}&&preview=false&&graphicDisplay=zl`)
|
||||
window.open(
|
||||
'http://192.168.1.179:4001' +
|
||||
`/zutai/?id=${e.id}&&name=${e.name}&&preview=false&&graphicDisplay=${VITE_FLAG ? 'ypt' : 'zl'}`
|
||||
)
|
||||
}
|
||||
// 删除
|
||||
const deleted = (e: any) => {
|
||||
ElMessageBox.confirm("此操作将永久删除该项目, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
ElMessageBox.confirm('此操作将永久删除该项目, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
let data = {
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
status: "0",
|
||||
};
|
||||
status: '0'
|
||||
}
|
||||
audit(data).then((res: any) => {
|
||||
if (res.code == "A0000") {
|
||||
if (res.code == 'A0000') {
|
||||
ElMessage({
|
||||
type: "success",
|
||||
message: "删除项目成功!",
|
||||
});
|
||||
type: 'success',
|
||||
message: '删除项目成功!'
|
||||
})
|
||||
}
|
||||
tableStore.index()
|
||||
});
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: "info",
|
||||
message: "已取消删除",
|
||||
});
|
||||
});
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const imgData = (e: any) => {
|
||||
window.open(window.location.origin + `/zutai/?id=${e.id}&&name=${e.name}&&preview=true&&graphicDisplay=zl#/preview_ZL`)
|
||||
window.open(
|
||||
window.location.origin + `/zutai/?id=${e.id}&&name=${e.name}&&preview=true&&graphicDisplay=${VITE_FLAG ? 'ypt' : 'zl'}#/preview_ZL`
|
||||
)
|
||||
// window.open('http://192.168.1.128:4001' + `/zutai/?id=${e.id}&&name=${e.name}&&preview=true&&graphicDisplay=zl#/preview_ZL`)
|
||||
|
||||
}
|
||||
|
||||
const onTableSizeChange = (val: number) => {
|
||||
@@ -155,7 +191,6 @@ const onTableSizeChange = (val: number) => {
|
||||
const onTableCurrentChange = (val: number) => {
|
||||
tableStore.onTableAction('current-page-change', { page: val })
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.text {
|
||||
@@ -179,7 +214,7 @@ span {
|
||||
.clearfix::before,
|
||||
.clearfix::after {
|
||||
display: table;
|
||||
content: "";
|
||||
content: '';
|
||||
}
|
||||
|
||||
.clearfix::after {
|
||||
@@ -189,7 +224,7 @@ span {
|
||||
.box-card {
|
||||
width: 100%;
|
||||
// border: 1px solid #000;
|
||||
box-shadow: var(--el-box-shadow-light)
|
||||
box-shadow: var(--el-box-shadow-light);
|
||||
}
|
||||
|
||||
.xiaoshou {
|
||||
@@ -218,7 +253,7 @@ span {
|
||||
|
||||
// 不可全选样式
|
||||
.el-tree-node {
|
||||
.is-leaf+.el-checkbox .el-checkbox__inner {
|
||||
.is-leaf + .el-checkbox .el-checkbox__inner {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ const departmentRef = ref()
|
||||
const show = ref(true)
|
||||
const lookShow = ref(true)
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/harmonic-boot/customReport/getTemplateList',
|
||||
url: '/cs-harmonic-boot/customReport/getTemplateList',
|
||||
method: 'POST',
|
||||
isWebPaging: true,
|
||||
column: [
|
||||
|
||||
106
src/views/govern/sensitiveLoadMange/detail.vue
Normal file
106
src/views/govern/sensitiveLoadMange/detail.vue
Normal file
@@ -0,0 +1,106 @@
|
||||
<template>
|
||||
<el-dialog class="cn-operate-dialog" width="600px" v-model.trim="dialogVisible" :title="title">
|
||||
<el-form :model="form" label-width="auto" ref="formRef" :rules="rules">
|
||||
<el-form-item label="所属厂站名称" prop="substationName">
|
||||
<el-input v-model.trim="form.substationName" placeholder="请输入所属厂站名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="敏感用户名称" prop="name">
|
||||
<el-input v-model.trim="form.name" placeholder="请输入敏感用户名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="敏感负荷类型" prop="loadType">
|
||||
<el-select v-model.trim="form.loadType" filterable clearable placeholder="请选择数据分类">
|
||||
<el-option
|
||||
v-for="item in DataTypeSelect"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户协议容量(MVA)" prop="userAgreementCapacity">
|
||||
<el-input-number style="width: 100%;" :min="0" maxlength="32" show-word-limit v-model.trim="form.userAgreementCapacity" placeholder="请输入用户协议容量"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="装机容量(MW)" prop="installedCapacity">
|
||||
<el-input-number style="width: 100%;" :min="0" maxlength="32" show-word-limit v-model.trim="form.installedCapacity" placeholder="请输入装机容量"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input-number style="width: 100%;" :min="0" maxlength="32" show-word-limit v-model.trim="form.sort" placeholder="请输入排序"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref,inject } from 'vue'
|
||||
import { reactive } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { queryByCode, queryCsDictTree } from '@/api/system-boot/dictTree'
|
||||
import { saveUser, updateUser } from '@/api/cs-device-boot/sensitiveLoadMange'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const TypeOptions = ref()
|
||||
|
||||
const dictData = useDictData()
|
||||
const DataTypeSelect = dictData.getBasicData('Sensitive_User_Type')
|
||||
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
|
||||
const formRef = ref()
|
||||
const form = reactive<any>({
|
||||
loadType: [],
|
||||
substationName: null,
|
||||
installedCapacity: null,
|
||||
name: null,
|
||||
userAgreementCapacity:null,
|
||||
id: null,
|
||||
sort:100
|
||||
})
|
||||
const rules = {
|
||||
substationName: [{ required: true, message: '所属厂站名称不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '敏感用户名称不能为空', trigger: 'blur' }],
|
||||
loadType: [{ required: true, message: '请选择敏感负荷类型', trigger: 'blur' }],
|
||||
installedCapacity: [{ required: true, message: '用户协议容量不能为空', trigger: 'blur' }],
|
||||
userAgreementCapacity: [{ required: true, message: '装机容量不能为空', trigger: 'blur' }],
|
||||
sort: [{ required: true, message: '排序不能为空', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const title = ref('新增')
|
||||
const open = (text: string, data?: anyObj) => {
|
||||
title.value = text
|
||||
dialogVisible.value = true
|
||||
if (data) {
|
||||
for (let key in form) {
|
||||
form[key] = data[key]
|
||||
}
|
||||
} else {
|
||||
for (let key in form) {
|
||||
form[key] = null
|
||||
form.sort = 100
|
||||
}
|
||||
}
|
||||
}
|
||||
const submit = () => {
|
||||
formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
if (form.id) {
|
||||
await updateUser(form)
|
||||
} else {
|
||||
await saveUser(form)
|
||||
}
|
||||
ElMessage.success('操作成功')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
105
src/views/govern/sensitiveLoadMange/index.vue
Normal file
105
src/views/govern/sensitiveLoadMange/index.vue
Normal file
@@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader date-picker>
|
||||
<template #operation>
|
||||
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<detail ref="detail"></detail>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import Detail from './detail.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { deleteUser } from '@/api/cs-device-boot/sensitiveLoadMange'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
defineOptions({
|
||||
name: 'govern/device/sensitiveLoadMange'
|
||||
})
|
||||
const detail = ref()
|
||||
|
||||
const dictData = useDictData()
|
||||
const interferenceType = dictData.getBasicData('Sensitive_User_Type')
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/cs-harmonic-boot/pqSensitiveUser/getList',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
width: 80,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '所属厂站名称', field: 'substationName', minWidth: 180 },
|
||||
{ title: '敏感用户名称', field: 'name', minWidth: 180 },
|
||||
{
|
||||
title: '敏感负荷类型',
|
||||
field: 'loadType',
|
||||
minWidth: 120,
|
||||
formatter: row => {
|
||||
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ title: '用户协议容量(MVA)', field: 'userAgreementCapacity', minWidth: 100 },
|
||||
{ title: '装机容量(MW)', field: 'installedCapacity', minWidth: 100 },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
detail.value.open('编辑', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'del',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
deleteUser([row.id]).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
loadCallback: () => {}
|
||||
})
|
||||
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
const addMenu = () => {
|
||||
detail.value.open('新增')
|
||||
}
|
||||
</script>
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<el-card class="bottom-container " style="min-height: 230px;">
|
||||
<div class="buttonBox">
|
||||
<el-button type="primary" icon="el-icon-Aim">复位</el-button>
|
||||
<el-button type="primary" icon="el-icon-Aim" @click="reset">复位</el-button>
|
||||
</div>
|
||||
<div class="tableBox">
|
||||
<Table ref="tableRef" height="100%"></Table>
|
||||
@@ -125,6 +125,10 @@ provide('tableRef', tableRef)
|
||||
const pageHeight = mainHeight(40)
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const reset = () => {
|
||||
tableRef.value.reset()
|
||||
}
|
||||
|
||||
const iframeSrc = ref('')
|
||||
|
||||
// 监听 props 变化
|
||||
|
||||
@@ -35,7 +35,7 @@ const departmentRef = ref()
|
||||
const show = ref(true)
|
||||
const lookShow = ref(true)
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/harmonic-boot/customReport/getTemplateList',
|
||||
url: '/cs-harmonic-boot/customReport/getTemplateList',
|
||||
method: 'POST',
|
||||
isWebPaging: true,
|
||||
column: [
|
||||
|
||||
Reference in New Issue
Block a user