优化项目

This commit is contained in:
guanj
2026-06-04 19:06:36 +08:00
parent 4f32f84132
commit 4f907a80c4
53 changed files with 987 additions and 3499 deletions

View File

@@ -4,13 +4,8 @@
<TableHeader datePicker ref="headerRef" :showReset="false"></TableHeader>
<Table ref="tableRef" />
</div>
<waveFormAnalysis
v-loading="loading"
v-if="isWaveCharts"
ref="waveFormAnalysisRef"
@handleHideCharts="isWaveCharts = false"
:wp="wp"
/>
<waveFormAnalysis v-loading="loading" v-if="isWaveCharts" ref="waveFormAnalysisRef"
@handleHideCharts="isWaveCharts = false" :wp="wp" />
</div>
</template>
<script lang="ts" setup>
@@ -57,16 +52,23 @@ const tableStore: any = new TableStore({
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'startTime', title: '发生时刻', minWidth: 170, sortable: true },
{ field: 'showName', title: '事件描述', minWidth: 120 },
{ field: 'startTime', title: '暂降发生时刻', minWidth: 180, sortable: true },
{
field: 'phaseType',
title: '相别',
minWidth: 80,
field: 'featureAmplitude',
title: '暂降(骤升)幅值(%)',
minWidth: 160,
sortable: true,
formatter: (row: any) => {
return row.cellValue || '/'
//row.cellValue = row.cellValue + '' ? row.cellValue.toFixed(2) : '/'
row.cellValue = row.cellValue != null ? Number(row.cellValue).toFixed(2) : '/'
if (String(row.cellValue).split('.')[1] == '00') {
row.cellValue = String(row.cellValue).split('.')[0]
}
return row.cellValue
}
},
{
field: 'persistTime',
title: '持续时间(s)',
@@ -79,18 +81,17 @@ const tableStore: any = new TableStore({
sortable: true
},
{
field: 'featureAmplitude',
title: '暂降(聚升)幅值(%)',
minWidth: 130,
field: 'phaseType',
title: '相别',
minWidth: 80,
formatter: (row: any) => {
//row.cellValue = row.cellValue + '' ? row.cellValue.toFixed(2) : '/'
row.cellValue = row.cellValue != null ? Number(row.cellValue).toFixed(2) : '/'
if (String(row.cellValue).split('.')[1] == '00') {
row.cellValue = String(row.cellValue).split('.')[0]
}
return row.cellValue
return row.cellValue || '/'
}
},
{ field: 'showName', title: '触发类型', minWidth: 120 },
{
title: '操作',
fixed: 'right',
@@ -111,7 +112,7 @@ const tableStore: any = new TableStore({
},
click: async row => {
row.loading1 = true
await analyseWave(row.id)
.then(res => {
isWaveCharts.value = true
@@ -149,7 +150,7 @@ const tableStore: any = new TableStore({
icon: 'el-icon-DataLine',
render: 'basicButton',
disabled: row => {
return row.showName != '未知'
return row.wavePath
}
},
{
@@ -164,6 +165,7 @@ const tableStore: any = new TableStore({
return !row.wavePath
},
click: row => {
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); //创建下载的链接
const url = window.URL.createObjectURL(blob)
@@ -173,6 +175,7 @@ const tableStore: any = new TableStore({
document.body.appendChild(link)
link.click() //执行下载
document.body.removeChild(link) //释放标签
ElMessage.success('波形下载成功')
})
}
},
@@ -202,7 +205,7 @@ const tableStore: any = new TableStore({
tableStore.table.params.list = tableParams.value.list
tableStore.table.params.type = 3
},
loadCallback: () => {}
loadCallback: () => { }
})
provide('tableStore', tableStore)
const isWaveCharts = ref(false)