156 lines
5.4 KiB
Vue
156 lines
5.4 KiB
Vue
<template>
|
|
|
|
<!-- <TableHeader :showReset="false">
|
|
|
|
</TableHeader> -->
|
|
<Table ref="tableRef" />
|
|
|
|
</template>
|
|
<script setup lang='ts'>
|
|
import { ref, provide, onMounted } from 'vue'
|
|
import { getEventByItem } from '@/api/cs-device-boot/planData'
|
|
import TableStore from '@/utils/tableStore'
|
|
import Table from '@/components/table/index.vue'
|
|
import TableHeader from '@/components/table/header/index.vue'
|
|
const props = defineProps({
|
|
activeName: String
|
|
})
|
|
const tableStore = new TableStore({
|
|
url: '/cs-harmonic-boot/data/getEventByItem',
|
|
method: 'POST',
|
|
paramsPOST: true,
|
|
showPage: false,
|
|
column: [
|
|
// { width: '60', type: 'checkbox', fixed: 'left' },
|
|
{
|
|
title: '序号', width: 80, formatter: (row: any) => {
|
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
|
}
|
|
},
|
|
{ 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) => {
|
|
row.cellValue = row.cellValue ? row.cellValue.toFixed(2) : '/'
|
|
return row.cellValue
|
|
}
|
|
},
|
|
{
|
|
field: 'featureAmplitude',
|
|
title: '暂降(聚升)幅值(%)',
|
|
minWidth: 100,
|
|
formatter: (row: any) => {
|
|
row.cellValue = row.cellValue + '' ? row.cellValue.toFixed(2) : '/'
|
|
if (String(row.cellValue).split('.')[1] == '00') {
|
|
row.cellValue = String(row.cellValue).split('.')[0]
|
|
}
|
|
return row.cellValue
|
|
}
|
|
},
|
|
{
|
|
title: '操作',
|
|
width: 180,
|
|
render: 'buttons',
|
|
fixed: 'right',
|
|
// buttons: [
|
|
// {
|
|
// name: 'edit',
|
|
// title: '波形解析',
|
|
// type: 'primary',
|
|
// icon: 'el-icon-Check',
|
|
// render: 'basicButton',
|
|
// loading: 'loading1',
|
|
// disabled: row => {
|
|
// // && row.evtParamTm < 20
|
|
// return !row.wavePath
|
|
// },
|
|
// click: async row => {
|
|
// row.loading1 = true
|
|
|
|
// await analyseWave(row.id)
|
|
// .then(res => {
|
|
// row.loading1 = false
|
|
// if (res != undefined) {
|
|
// boxoList.value = row
|
|
// boxoList.value.systemType = 'WX'
|
|
// wp.value = res.data
|
|
// view.value = false
|
|
// view2.value = true
|
|
// }
|
|
// })
|
|
// .catch(() => {
|
|
// row.loading1 = false
|
|
// })
|
|
// isWaveCharts.value = true
|
|
// nextTick(() => {
|
|
// waveFormAnalysisRef.value && waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value)
|
|
// })
|
|
// }
|
|
// },
|
|
// {
|
|
// name: 'edit',
|
|
// text: '暂无波形',
|
|
// type: 'info',
|
|
// icon: 'el-icon-DataLine',
|
|
// render: 'basicButton',
|
|
// disabled: row => {
|
|
// return row.wavePath
|
|
// }
|
|
// },
|
|
// {
|
|
// name: 'edit',
|
|
// title: '波形下载',
|
|
// type: 'primary',
|
|
// loading: 'loading2',
|
|
// icon: 'el-icon-Check',
|
|
// render: 'basicButton',
|
|
// disabled: row => {
|
|
// // && row.evtParamTm < 20
|
|
// return !row.wavePath
|
|
// },
|
|
// click: row => {
|
|
// row.loading2 = true
|
|
// const url = window.location.origin + '/api/cs-harmonic-boot/event/getFileZip?eventId=' + row.id
|
|
// window.open(url, '_self')
|
|
// setTimeout(() => {
|
|
// ElMessage.success('波形下载成功!')
|
|
// row.loading2 = false
|
|
// }, 1500)
|
|
// }
|
|
// }
|
|
// ]
|
|
}
|
|
],
|
|
|
|
loadCallback: () => {
|
|
|
|
}
|
|
})
|
|
provide('tableStore', tableStore)
|
|
const init = () => {
|
|
tableStore.table.params.id = props.activeName
|
|
// getEventByItem({ id: props.activeName }).then(res => {
|
|
|
|
// })
|
|
tableStore.index()
|
|
}
|
|
onMounted(() => {
|
|
|
|
})
|
|
defineExpose({ init })
|
|
|
|
</script>
|
|
<style lang="scss" scoped></style>
|