方案数据添加暂态事件页面

This commit is contained in:
GGJ
2024-12-19 10:16:08 +08:00
parent 8089fcb7de
commit b10854971d
16 changed files with 283 additions and 171 deletions

View File

@@ -2,12 +2,8 @@
<div class="view">
<TableHeader datePicker ref="headerRef" v-if="!isWaveCharts" :showReset="false"></TableHeader>
<Table ref="tableRef" v-if="!isWaveCharts" />
<waveFormAnalysis
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>
@@ -24,6 +20,7 @@ const tableParams: any = ref({})
const refheader = ref()
const view = ref(true)
const view2 = ref(false)
const loading = ref(false)
const showBoxi = ref(true)
const bxactiveName = ref('ssbx')
const boxoList: any = ref([])
@@ -37,9 +34,11 @@ const tableStore: any = new TableStore({
method: 'POST',
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
} },
{
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 },
{
@@ -84,14 +83,15 @@ const tableStore: any = new TableStore({
type: 'primary',
icon: 'el-icon-Check',
render: 'basicButton',
loading:'loading1',
loading: 'loading1',
disabled: row => {
// && row.evtParamTm < 20
return !row.wavePath
},
click: async row => {
row.loading1 = true
isWaveCharts.value = true
loading.value = true
await analyseWave(row.id)
.then(res => {
row.loading1 = false
@@ -102,13 +102,16 @@ const tableStore: any = new TableStore({
view.value = false
view2.value = true
}
loading.value = false
})
.catch(() => {
row.loading1 = false
loading.value = false
})
isWaveCharts.value = true
nextTick(() => {
waveFormAnalysisRef.value && waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value)
waveFormAnalysisRef.value && waveFormAnalysisRef.value.setHeight(200, 345)
})
}
},
@@ -126,7 +129,7 @@ const tableStore: any = new TableStore({
name: 'edit',
title: '波形下载',
type: 'primary',
loading:'loading2',
loading: 'loading2',
icon: 'el-icon-Check',
render: 'basicButton',
disabled: row => {
@@ -153,7 +156,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)