2024-07-03 19:31:43 +08:00
|
|
|
<template>
|
2024-09-27 10:27:33 +08:00
|
|
|
<div class="view">
|
|
|
|
|
<TableHeader datePicker ref="headerRef" v-if="!isWaveCharts"></TableHeader>
|
2024-07-23 17:28:31 +08:00
|
|
|
<Table ref="tableRef" v-if="!isWaveCharts" />
|
2024-09-27 10:27:33 +08:00
|
|
|
<waveFormAnalysis
|
|
|
|
|
v-if="isWaveCharts"
|
|
|
|
|
ref="waveFormAnalysisRef"
|
|
|
|
|
@handleHideCharts="isWaveCharts = false"
|
|
|
|
|
:wp="wp"
|
|
|
|
|
/>
|
2024-10-16 20:31:54 +08:00
|
|
|
<!-- <el-button v-if="isWaveCharts" type="primary" @click="handleBack" :icon="ArrowLeft">返回</el-button> -->
|
2024-07-03 19:31:43 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
2024-09-27 10:27:33 +08:00
|
|
|
import { ref, onMounted, provide, nextTick, defineEmits } from 'vue'
|
2024-07-23 17:28:31 +08:00
|
|
|
import { getTabsDataByType } from '@/api/cs-device-boot/EquipmentDelivery'
|
|
|
|
|
import TableStore from '@/utils/tableStore'
|
|
|
|
|
import Table from '@/components/table/index.vue'
|
2024-09-25 16:31:45 +08:00
|
|
|
import TableHeader from '@/components/table/header/index.vue'
|
2024-07-23 17:28:31 +08:00
|
|
|
import waveFormAnalysis from './components/waveFormAnalysis.vue'
|
2024-07-24 20:35:16 +08:00
|
|
|
import { ArrowLeft } from '@element-plus/icons-vue'
|
2024-07-31 10:42:04 +08:00
|
|
|
import { analyseWave } from '@/api/common'
|
2024-07-23 17:28:31 +08:00
|
|
|
const tableParams: any = ref({})
|
2024-07-31 10:42:04 +08:00
|
|
|
const refheader = ref()
|
|
|
|
|
const view = ref(true)
|
|
|
|
|
const view2 = ref(false)
|
|
|
|
|
const showBoxi = ref(true)
|
|
|
|
|
const bxactiveName = ref('ssbx')
|
2024-09-25 16:31:45 +08:00
|
|
|
const boxoList: any = ref([])
|
2024-07-31 10:42:04 +08:00
|
|
|
const wp = ref({})
|
|
|
|
|
const value = ref(1)
|
2024-08-01 10:55:08 +08:00
|
|
|
const waveFormAnalysisRef = ref()
|
2024-09-25 16:31:45 +08:00
|
|
|
const headerRef = ref()
|
2024-07-23 17:28:31 +08:00
|
|
|
const tableStore: any = new TableStore({
|
|
|
|
|
url: '/cs-device-boot/csGroup/deviceDataByType',
|
2024-10-16 20:31:54 +08:00
|
|
|
publicHeight: 215,
|
2024-07-23 17:28:31 +08:00
|
|
|
method: 'POST',
|
|
|
|
|
column: [
|
|
|
|
|
// { width: '60', type: 'checkbox', fixed: 'left' },
|
|
|
|
|
{ title: '序号', type: 'seq', width: 80 },
|
2024-07-24 20:35:16 +08:00
|
|
|
{ field: 'startTime', title: '发生时刻', minWidth: 170 },
|
|
|
|
|
{ field: 'showName', title: '事件描述', minWidth: 170 },
|
|
|
|
|
{
|
|
|
|
|
field: 'phaseType',
|
|
|
|
|
title: '相别',
|
|
|
|
|
minWidth: 100,
|
|
|
|
|
formatter: (row: any) => {
|
|
|
|
|
row.cellValue = row.cellValue ? row.cellValue : '/'
|
|
|
|
|
return row.cellValue
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'persistTime',
|
|
|
|
|
title: '持续时间(s)',
|
|
|
|
|
minWidth: 100,
|
|
|
|
|
formatter: (row: any) => {
|
2024-10-16 20:31:54 +08:00
|
|
|
row.cellValue = row.cellValue ? row.cellValue.toFixed(2) : '/'
|
2024-07-24 20:35:16 +08:00
|
|
|
return row.cellValue
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-09-24 11:10:57 +08:00
|
|
|
field: 'featureAmplitude',
|
2024-07-24 20:35:16 +08:00
|
|
|
title: '暂降幅值(%)',
|
|
|
|
|
minWidth: 100,
|
|
|
|
|
formatter: (row: any) => {
|
2024-09-30 11:08:35 +08:00
|
|
|
row.cellValue = row.cellValue ? row.cellValue.toFixed(2) : '/'
|
2024-07-24 20:35:16 +08:00
|
|
|
return row.cellValue
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-07-23 17:28:31 +08:00
|
|
|
{
|
|
|
|
|
title: '操作',
|
2024-07-24 20:35:16 +08:00
|
|
|
width: 180,
|
2024-07-23 17:28:31 +08:00
|
|
|
render: 'buttons',
|
2024-07-24 20:35:16 +08:00
|
|
|
fixed: 'right',
|
2024-07-23 17:28:31 +08:00
|
|
|
buttons: [
|
|
|
|
|
{
|
|
|
|
|
name: 'edit',
|
|
|
|
|
title: '波形解析',
|
|
|
|
|
type: 'primary',
|
|
|
|
|
icon: 'el-icon-Check',
|
|
|
|
|
render: 'basicButton',
|
2024-10-09 10:01:39 +08:00
|
|
|
disabled: row => {
|
|
|
|
|
// && row.evtParamTm < 20
|
|
|
|
|
return !row.wavePath
|
|
|
|
|
},
|
2024-07-31 10:42:04 +08:00
|
|
|
click: async row => {
|
|
|
|
|
row.loading = true
|
2024-09-27 10:27:33 +08:00
|
|
|
|
2024-09-24 11:10:57 +08:00
|
|
|
await analyseWave(row.id)
|
2024-07-31 10:42:04 +08:00
|
|
|
.then(res => {
|
|
|
|
|
row.loading = false
|
|
|
|
|
if (res != undefined) {
|
2024-08-01 10:55:08 +08:00
|
|
|
boxoList.value = row
|
2024-10-16 20:31:54 +08:00
|
|
|
boxoList.value.systemType = 'WX'
|
2024-07-31 10:42:04 +08:00
|
|
|
wp.value = res.data
|
|
|
|
|
view.value = false
|
|
|
|
|
view2.value = true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
row.loading = false
|
|
|
|
|
})
|
2024-08-01 10:55:08 +08:00
|
|
|
isWaveCharts.value = true
|
|
|
|
|
nextTick(() => {
|
|
|
|
|
waveFormAnalysisRef.value && waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value)
|
|
|
|
|
})
|
2024-07-23 17:28:31 +08:00
|
|
|
}
|
2024-10-15 15:31:36 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'edit',
|
|
|
|
|
text: '暂无波形',
|
|
|
|
|
type: 'info',
|
|
|
|
|
icon: 'el-icon-DataLine',
|
|
|
|
|
render: 'basicButton',
|
|
|
|
|
disabled: row => {
|
|
|
|
|
return row.wavePath
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
2024-07-23 17:28:31 +08:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
beforeSearchFun: () => {
|
|
|
|
|
tableStore.table.params.devId = tableParams.value.devId
|
|
|
|
|
tableStore.table.params.lineId = tableParams.value.lineId
|
|
|
|
|
tableStore.table.params.list = tableParams.value.list
|
|
|
|
|
tableStore.table.params.type = 3
|
|
|
|
|
},
|
|
|
|
|
loadCallback: () => {}
|
|
|
|
|
})
|
|
|
|
|
provide('tableStore', tableStore)
|
|
|
|
|
const isWaveCharts = ref(false)
|
|
|
|
|
//获取请求参数
|
|
|
|
|
const getTableParams = (val: any) => {
|
|
|
|
|
tableParams.value = val
|
|
|
|
|
console.log(tableParams.value, '暂态时间表格请求参数')
|
|
|
|
|
isWaveCharts.value = false
|
|
|
|
|
tableStore.index()
|
|
|
|
|
}
|
|
|
|
|
//返回
|
2024-08-01 10:55:08 +08:00
|
|
|
const handleBack = async () => {
|
2024-07-24 20:35:16 +08:00
|
|
|
isWaveCharts.value = false
|
2024-08-01 10:55:08 +08:00
|
|
|
console.log(6666666, isWaveCharts.value)
|
2024-09-27 10:27:33 +08:00
|
|
|
emit('activeTabsType', '')
|
2024-08-01 10:55:08 +08:00
|
|
|
await tableStore.index()
|
2024-07-23 17:28:31 +08:00
|
|
|
}
|
|
|
|
|
defineExpose({ getTableParams })
|
2024-07-03 19:31:43 +08:00
|
|
|
onMounted(() => {
|
2024-07-23 17:28:31 +08:00
|
|
|
tableStore.index()
|
2024-07-03 19:31:43 +08:00
|
|
|
})
|
|
|
|
|
</script>
|
2024-07-23 17:28:31 +08:00
|
|
|
<style lang="scss" scoped>
|
2024-07-24 20:35:16 +08:00
|
|
|
.header_btn {
|
2024-07-23 17:28:31 +08:00
|
|
|
width: 100%;
|
|
|
|
|
height: 30px;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
2024-07-03 19:31:43 +08:00
|
|
|
</style>
|