需求变更整改
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="default-main analyze-apf" :style="{ height: pageHeight.height }" v-loading="loading">
|
||||
<DeviceTree @node-click="nodeClick" @init="nodeClick"></DeviceTree>
|
||||
<DeviceTree @node-click="nodeClick" @init="nodeClick" @deviceTypeChange="deviceTypeChange"></DeviceTree>
|
||||
<div class="analyze-apf-right" v-if="formInline.devId">
|
||||
<div ref="headerRef">
|
||||
<TableHeader :showSearch="false" ref="tableHeaderRef" @selectChange="selectChange">
|
||||
@@ -101,6 +101,7 @@ const formInline = reactive({
|
||||
const timeFlag = ref(true)
|
||||
const frequencyShow = ref(false)
|
||||
const devCapacity = ref(0)
|
||||
const flag = ref(false)
|
||||
const typelist = [
|
||||
{
|
||||
label: '平均值',
|
||||
@@ -139,8 +140,12 @@ const init = () => {
|
||||
})
|
||||
})
|
||||
}
|
||||
const deviceTypeChange = (val: any, obj: any) => {
|
||||
flag.value = true
|
||||
nodeClick(obj)
|
||||
}
|
||||
const nodeClick = async (e: anyObj) => {
|
||||
if (e.level == 2) {
|
||||
if (e.level == 2 && flag.value) {
|
||||
formInline.devId = e.id
|
||||
loading.value = true
|
||||
if (zblist.value.length === 0) {
|
||||
@@ -222,7 +227,7 @@ const search = () => {
|
||||
let lineName = lineStyle[Object.keys(anotherList).indexOf(k)]
|
||||
let phaseList = processingOfData(anotherList[k], 'phase')
|
||||
for (let j in phaseList) {
|
||||
color.push(j == 'A' ? '#FFCC00' : j == 'B' ? '#009900' : j == 'C' ? '#CC0000' : '#0000CC')
|
||||
color.push(j == 'A' ? '#DAA520' : j == 'B' ? '#2E8B57' : j == 'C' ? '#A52a2a' : '#0000CC')
|
||||
legend.push(
|
||||
j == 'M' ? k : j == 'A' ? `A相_${k}` : j == 'B' ? `B相_${k}` : j == 'C' ? `C相_${k}` : j
|
||||
)
|
||||
|
||||
@@ -1,21 +1,36 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div class="analyze-dvr" v-show="!isWaveCharts" :style="{ height: pageHeight.height }" v-loading="loading">
|
||||
<DeviceTree @node-click="nodeClick" @init="nodeClick"></DeviceTree>
|
||||
<DeviceTree @node-click="nodeClick" @init="nodeClick" @deviceTypeChange="deviceTypeChange"></DeviceTree>
|
||||
<div class="analyze-dvr-right" v-if="tableStore.table.params.deviceId">
|
||||
<TableHeader datePicker showExport>
|
||||
<template v-slot:select>
|
||||
|
||||
<el-form-item label="事件类型">
|
||||
<el-select v-model.trim="tableStore.table.params.eventType" clearable placeholder="请选择事件类型">
|
||||
<el-option v-for="item in eventList" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
<el-select
|
||||
v-model.trim="tableStore.table.params.eventType"
|
||||
clearable
|
||||
placeholder="请选择事件类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in eventList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="位置">
|
||||
<el-select v-model.trim="tableStore.table.params.location" clearable placeholder="请选择位置">
|
||||
<el-option v-for="item in locationList" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
<el-select
|
||||
v-model.trim="tableStore.table.params.location"
|
||||
clearable
|
||||
placeholder="请选择位置"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in locationList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -24,8 +39,14 @@
|
||||
</div>
|
||||
<el-empty v-else description="请选择设备" class="analyze-dvr-right" />
|
||||
</div>
|
||||
<waveFormAnalysis v-loading="loading" v-if="isWaveCharts" ref="waveFormAnalysisRef"
|
||||
@handleHideCharts="isWaveCharts = false" :wp="wp" style="padding: 10px;" />
|
||||
<waveFormAnalysis
|
||||
v-loading="loading"
|
||||
v-if="isWaveCharts"
|
||||
ref="waveFormAnalysisRef"
|
||||
@handleHideCharts="isWaveCharts = false"
|
||||
:wp="wp"
|
||||
style="padding: 10px"
|
||||
/>
|
||||
<!-- <div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="!view">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
@@ -67,14 +88,14 @@ import { mainHeight } from '@/utils/layout'
|
||||
import DeviceTree from '@/components/tree/govern/deviceTree.vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue';
|
||||
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue'
|
||||
import { analyseWave } from '@/api/common'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
|
||||
import { getFileZip } from '@/api/cs-harmonic-boot/datatrend'
|
||||
import { ElMessage } from 'element-plus'
|
||||
defineOptions({
|
||||
name: 'analyze/DVR/index'
|
||||
name: 'govern/analyze/DVR/index'
|
||||
})
|
||||
const pageHeight = mainHeight(20)
|
||||
const loading = ref(false)
|
||||
@@ -85,43 +106,49 @@ const isWaveCharts = ref(false)
|
||||
const bxactiveName = ref('ssbx')
|
||||
const boxoList: any = ref({})
|
||||
const wp = ref({})
|
||||
const eventList = ref([{
|
||||
value: 'Evt_Sys_DipStr',
|
||||
label: '电压暂降'
|
||||
},
|
||||
{
|
||||
value: 'Evt_Sys_SwlStr',
|
||||
label: '电压暂升'
|
||||
},
|
||||
{
|
||||
value: 'Evt_Sys_IntrStr',
|
||||
label: '电压中断'
|
||||
}])
|
||||
const locationList = ref([{
|
||||
value: 'grid',
|
||||
label: '电网侧'
|
||||
},
|
||||
{
|
||||
value: 'load',
|
||||
label: '负载侧'
|
||||
}])
|
||||
const eventList = ref([
|
||||
{
|
||||
value: 'Evt_Sys_DipStr',
|
||||
label: '电压暂降'
|
||||
},
|
||||
{
|
||||
value: 'Evt_Sys_SwlStr',
|
||||
label: '电压暂升'
|
||||
},
|
||||
{
|
||||
value: 'Evt_Sys_IntrStr',
|
||||
label: '电压中断'
|
||||
}
|
||||
])
|
||||
const locationList = ref([
|
||||
{
|
||||
value: 'grid',
|
||||
label: '电网侧'
|
||||
},
|
||||
{
|
||||
value: 'load',
|
||||
label: '负载侧'
|
||||
}
|
||||
])
|
||||
const waveFormAnalysisRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-harmonic-boot/eventUser/queryEventpageWeb',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '事件描述', field: 'showName', },
|
||||
{ title: '事件描述', field: 'showName' },
|
||||
{ title: '发生位置', field: 'evtParamPosition' },
|
||||
{ title: '持续时间(s)', field: 'evtParamTm' },
|
||||
{ title: '持续时间(s)', field: 'evtParamTm', sortable: true },
|
||||
{
|
||||
title: '暂降(聚升)幅值(%)', field: 'evtParamVVaDepth', formatter: (row: any) => {
|
||||
title: '暂降(聚升)幅值(%)',
|
||||
field: 'evtParamVVaDepth',
|
||||
formatter: (row: any) => {
|
||||
let a = row.cellValue.split('%')[0] - 0
|
||||
console.log("🚀 ~ a:", a)
|
||||
console.log('🚀 ~ a:', a)
|
||||
return a ? a.toFixed(2) : '/'
|
||||
}
|
||||
}, sortable: true
|
||||
},
|
||||
{ title: '发生时刻', field: 'startTime' },
|
||||
{ title: '发生时刻', field: 'startTime', sortable: true },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
@@ -147,11 +174,10 @@ const tableStore = new TableStore({
|
||||
row.loading1 = false
|
||||
if (res != undefined) {
|
||||
boxoList.value = row
|
||||
boxoList.value.featureAmplitude = row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth - 0 : null
|
||||
boxoList.value.featureAmplitude =
|
||||
row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth - 0 : null
|
||||
// boxoList.value.systemType = 'WX'
|
||||
wp.value = res.data
|
||||
|
||||
|
||||
}
|
||||
loading.value = false
|
||||
})
|
||||
@@ -161,7 +187,8 @@ const tableStore = new TableStore({
|
||||
})
|
||||
|
||||
nextTick(() => {
|
||||
waveFormAnalysisRef.value && waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value, true)
|
||||
waveFormAnalysisRef.value &&
|
||||
waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value, true)
|
||||
waveFormAnalysisRef.value && waveFormAnalysisRef.value.setHeight(false, 150)
|
||||
})
|
||||
}
|
||||
@@ -174,9 +201,7 @@ const tableStore = new TableStore({
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !(!row.wavePath && row.evtParamTm < 20)
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
@@ -199,10 +224,9 @@ const tableStore = new TableStore({
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link) //释放标签
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -210,17 +234,21 @@ const tableStore = new TableStore({
|
||||
tableStore.table.data.forEach((item: any) => {
|
||||
item.loading = false
|
||||
item.evtParamTm = item.evtParamTm.split('s')[0]
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
const flag = ref(false)
|
||||
tableStore.table.params.type = 0
|
||||
tableStore.table.params.eventType = ''
|
||||
tableStore.table.params.location = ''
|
||||
provide('tableStore', tableStore)
|
||||
const deviceTypeChange = (val: any, obj: any) => {
|
||||
flag.value = true
|
||||
nodeClick(obj)
|
||||
}
|
||||
const nodeClick = async (e: anyObj) => {
|
||||
// console.log("🚀 ~ nodeClick ~ e:", e)
|
||||
if (e.level == 2) {
|
||||
if (e.level == 2&& flag.value) {
|
||||
loading.value = false
|
||||
tableStore.table.params.deviceId = e.id
|
||||
nextTick(() => {
|
||||
|
||||
Reference in New Issue
Block a user