修改测试bug
This commit is contained in:
@@ -5,18 +5,18 @@
|
||||
<div class="analyze-dvr-right" v-if="tableStore.table.params.deviceId">
|
||||
<TableHeader datePicker showExport>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="事件类型">
|
||||
<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>
|
||||
</el-form-item>
|
||||
<el-form-item label="位置">
|
||||
<!-- <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>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table v-if="view" ref="tableRef"></Table>
|
||||
@@ -69,7 +69,7 @@ import Table from '@/components/table/index.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 { useDictData } from '@/stores/dictData'
|
||||
import { getFileZip } from '@/api/cs-harmonic-boot/datatrend'
|
||||
import { ElMessage } from 'element-plus'
|
||||
defineOptions({
|
||||
@@ -109,7 +109,9 @@ const locationList = ref([
|
||||
}
|
||||
])
|
||||
const waveFormAnalysisRef = ref()
|
||||
|
||||
const dictData = useDictData()
|
||||
const ReasonList: any = dictData.getBasicData('Event_Reason')
|
||||
const EventTypeList: any = dictData.getBasicData('Event_Type')
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-harmonic-boot/eventUser/queryEventpageWeb',
|
||||
method: 'POST',
|
||||
@@ -122,14 +124,14 @@ const tableStore = new TableStore({
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '暂降发生时刻', field: 'startTime', sortable: true, minWidth: 180 },
|
||||
{ title: '发生时刻', field: 'startTime', sortable: true, minWidth: 180 },
|
||||
{
|
||||
title: '暂降(骤升)幅值(%)',
|
||||
title: '暂降幅值(%)',
|
||||
field: 'evtParamVVaDepth',
|
||||
minWidth: 160,
|
||||
minWidth: 120,
|
||||
formatter: (row: any) => {
|
||||
let a = row.cellValue.split('%')[0] - 0
|
||||
return a ? a.toFixed(2) : '/'
|
||||
return a ? a.toFixed(2) : '-'
|
||||
},
|
||||
sortable: true
|
||||
},
|
||||
@@ -140,22 +142,31 @@ const tableStore = new TableStore({
|
||||
minWidth: 110,
|
||||
formatter: (row: any) => {
|
||||
const val = row.cellValue
|
||||
if (val === null || val === undefined || val === '' || val === '-') return '/'
|
||||
if (val === null || val === undefined || val === '' ) return '-'
|
||||
const num = Number(val)
|
||||
if (Number.isNaN(num)) return '/'
|
||||
if (Number.isNaN(num)) return '-'
|
||||
return Math.floor(num * 10000) / 100
|
||||
}
|
||||
},
|
||||
{ title: '相别', field: 'evtParamPhase', minWidth: 80, align: 'center' },
|
||||
{ title: '触发类型', field: 'showName', minWidth: 150 },
|
||||
{
|
||||
title: '发生位置', field: 'evtParamPosition', minWidth: 150,
|
||||
formatter: (row: any) => {
|
||||
const val = row.cellValue
|
||||
if (val === null || val === undefined || val === '' || val === '-') return '/'
|
||||
|
||||
return val
|
||||
title: '暂降原因', field: 'advanceReason', minWidth: 100, align: 'center', formatter: (row: any) => {
|
||||
return ReasonList.find((item: any) => item.value == row.cellValue)?.label || '未知'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '暂降类型', field: 'advanceType', minWidth: 100, align: 'center', formatter: (row: any) => {
|
||||
return EventTypeList.find((item: any) => item.value == row.cellValue)?.label || '未知'
|
||||
}
|
||||
},
|
||||
{ title: '电压等级(kV)', field: 'lineVoltage', minWidth: 120, align: 'center', sortable: true, },
|
||||
{
|
||||
title: '发生位置', field: 'sagSource', minWidth: 120, align: 'center', formatter: (row: any) => {
|
||||
return row.cellValue == 1 ? '上游' : row.cellValue == 2 ? '下游' : '未知'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -232,6 +243,7 @@ const tableStore = new TableStore({
|
||||
return !row.wavePath
|
||||
},
|
||||
click: row => {
|
||||
row.loading2 = true
|
||||
ElMessage.info('下载中......')
|
||||
getFileZip({ eventId: row.id }).then(res => {
|
||||
let blob = new Blob([res], { type: 'application/zip' }) // console.log(blob) // var href = window.URL.createObjectURL(blob); //创建下载的链接
|
||||
@@ -243,6 +255,9 @@ const tableStore = new TableStore({
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link) //释放标签
|
||||
ElMessage.success('波形下载成功')
|
||||
row.loading2 = false
|
||||
}).catch(() => {
|
||||
row.loading2 = false
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -267,7 +282,7 @@ const deviceTypeChange = (val: any, obj: any) => {
|
||||
}
|
||||
const nodeClick = async (e: anyObj) => {
|
||||
// console.log("🚀 ~ nodeClick ~ e:", e)
|
||||
if ((e.level == 2 || e.level == 3) && flag.value) {
|
||||
if ((e.level == 2 || e.level == 3) ) {
|
||||
loading.value = false
|
||||
tableStore.table.params.deviceId = e.id
|
||||
nextTick(() => {
|
||||
|
||||
Reference in New Issue
Block a user