优化暂态事件列表
This commit is contained in:
@@ -1,18 +1,25 @@
|
||||
<template>
|
||||
<div class="view">
|
||||
<div v-show="!isWaveCharts">
|
||||
<TableHeader datePicker ref="headerRef" :showReset="false"></TableHeader>
|
||||
<TableHeader datePicker showExport ref="headerRef" @onResetForm="onResetForm">
|
||||
<template v-slot:operation>
|
||||
<el-button type="primary" icon="el-icon-Operation" @click="openFilterDialog">事件筛选</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<MultiCondition v-model:visible="filterVisible" :params="tableStore.table.params" ref="multiConditionRef"
|
||||
@confirm="onFilterConfirm" />
|
||||
</div>
|
||||
<waveFormAnalysis v-loading="loading" v-if="isWaveCharts" ref="waveFormAnalysisRef"
|
||||
@handleHideCharts="isWaveCharts = false" :wp="wp" />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, provide, nextTick, defineEmits } from 'vue'
|
||||
import { ref, onMounted, provide, nextTick, } from 'vue'
|
||||
import { getTabsDataByType } from '@/api/cs-device-boot/EquipmentDelivery'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import MultiCondition from '@/views/govern/alarm/multiCondition.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import waveFormAnalysis from './components/waveFormAnalysis.vue'
|
||||
import { ArrowLeft, Message } from '@element-plus/icons-vue'
|
||||
@@ -20,6 +27,7 @@ import { ElMessage } from 'element-plus'
|
||||
import { analyseWave, getFileByEventId } from '@/api/common'
|
||||
import { getFileZip } from '@/api/cs-harmonic-boot/datatrend'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const emit=defineEmits(['fileRecall'])
|
||||
const tableParams: any = ref({})
|
||||
const refheader = ref()
|
||||
const view = ref(true)
|
||||
@@ -31,7 +39,7 @@ const boxoList: any = ref([])
|
||||
const wp = ref({})
|
||||
const value = ref(1)
|
||||
const waveFormAnalysisRef = ref()
|
||||
const headerRef = ref()
|
||||
const multiConditionRef = ref()
|
||||
|
||||
const props = defineProps({
|
||||
deviceType: {
|
||||
@@ -46,6 +54,7 @@ const tableStore: any = new TableStore({
|
||||
url: '/cs-device-boot/csGroup/deviceDataByType',
|
||||
publicHeight: 215,
|
||||
method: 'POST',
|
||||
exportName: '暂态事件',
|
||||
column: [
|
||||
// { width: '60', type: 'checkbox', fixed: 'left' },
|
||||
{
|
||||
@@ -91,15 +100,20 @@ const tableStore: any = new TableStore({
|
||||
return row.cellValue || '-'
|
||||
}
|
||||
},
|
||||
{ field: 'showName', title: '触发类型', minWidth: 120 },
|
||||
{
|
||||
title: '严重度', field: 'severity', minWidth: 80, align: 'center', sortable: true, formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{ field: 'showName', title: '触发类型', minWidth: 100 },
|
||||
{
|
||||
title: '暂降原因', field: 'advanceReason', minWidth: 100, align: 'center', formatter: (row: any) => {
|
||||
return ReasonList.find((item: any) => item.value == row.cellValue)?.label || '未知'
|
||||
return ReasonList.find((item: any) => item.id == row.cellValue)?.name || '未知'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '暂降类型', field: 'advanceType', minWidth: 100, align: 'center', formatter: (row: any) => {
|
||||
return EventTypeList.find((item: any) => item.value == row.cellValue)?.label || '未知'
|
||||
return EventTypeList.find((item: any) => item.id == row.cellValue)?.name || '未知'
|
||||
}
|
||||
},
|
||||
{ title: '电压等级(kV)', field: 'lineVoltage', minWidth: 120, align: 'center', sortable: true, },
|
||||
@@ -161,16 +175,16 @@ const tableStore: any = new TableStore({
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
text: '暂无波形',
|
||||
type: 'info',
|
||||
icon: 'el-icon-DataLine',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.wavePath
|
||||
}
|
||||
},
|
||||
// {
|
||||
// name: 'edit',
|
||||
// text: '暂无波形',
|
||||
// type: 'info',
|
||||
// icon: 'el-icon-DataLine',
|
||||
// render: 'basicButton',
|
||||
// disabled: row => {
|
||||
// return row.wavePath
|
||||
// }
|
||||
// },
|
||||
{
|
||||
name: 'edit',
|
||||
title: '波形下载',
|
||||
@@ -207,14 +221,24 @@ const tableStore: any = new TableStore({
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Check',
|
||||
render: 'basicButton',
|
||||
loading: 'loading3',
|
||||
disabled: row => {
|
||||
return !(props.deviceType == '2' && row.wavePath == null)
|
||||
return !(row.wavePath == null)
|
||||
},
|
||||
click: row => {
|
||||
getFileByEventId(row.id).then(res => {
|
||||
ElMessage.success(res.message)
|
||||
tableStore.index()
|
||||
})
|
||||
if (props.deviceType == '2') {
|
||||
row.loading3 = true
|
||||
getFileByEventId(row.id).then(res => {
|
||||
ElMessage.success(res.message)
|
||||
tableStore.index()
|
||||
row.loading3 = false
|
||||
}).catch(() => {
|
||||
row.loading3 = false
|
||||
})
|
||||
}else if(props.deviceType == '1'){
|
||||
emit('fileRecall', row.id)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -229,6 +253,27 @@ const tableStore: any = new TableStore({
|
||||
},
|
||||
loadCallback: () => { }
|
||||
})
|
||||
Object.assign(tableStore.table.params, {
|
||||
featureAmplitudeMin: undefined,
|
||||
featureAmplitudeMax: undefined,
|
||||
evtParamTmMin: undefined,
|
||||
evtParamTmMax: undefined,
|
||||
severityMin: undefined,
|
||||
severityMax: undefined,
|
||||
fileFlag: ''
|
||||
})
|
||||
// 重置
|
||||
const onResetForm = () => {
|
||||
filterVisible.value = false
|
||||
tableStore.table.params.cascader = ''
|
||||
tableStore.table.params.deviceTypeId = ''
|
||||
tableStore.table.params.engineeringid = ''
|
||||
tableStore.table.params.projectId = ''
|
||||
tableStore.table.params.deviceId = ''
|
||||
tableStore.table.params.deviceTypeName = ''
|
||||
multiConditionRef.value?.reset()
|
||||
}
|
||||
const filterVisible = ref(false)
|
||||
provide('tableStore', tableStore)
|
||||
const isWaveCharts = ref(false)
|
||||
//获取请求参数
|
||||
@@ -237,17 +282,18 @@ const getTableParams = (val: any) => {
|
||||
isWaveCharts.value = false
|
||||
tableStore.index()
|
||||
}
|
||||
//返回
|
||||
const handleBack = async () => {
|
||||
isWaveCharts.value = false
|
||||
emit('activeTabsType', '')
|
||||
await tableStore.index()
|
||||
const onFilterConfirm = () => {
|
||||
tableStore.onTableAction('search', {})
|
||||
}
|
||||
const openFilterDialog = () => {
|
||||
filterVisible.value = true
|
||||
}
|
||||
|
||||
defineExpose({ getTableParams })
|
||||
onMounted(() => {
|
||||
console.log('🚀 ~ props.deviceType:', props.deviceType)
|
||||
|
||||
tableStore.index()
|
||||
|
||||
// tableStore.index()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user