污染值报表

This commit is contained in:
sjl
2025-09-11 08:46:12 +08:00
parent b48d247fcf
commit 82e41eefdb
5 changed files with 630 additions and 1 deletions

View File

@@ -0,0 +1,59 @@
<template>
<div class="default-main">
<TableHeader>
<template v-slot:select>
<el-form-item label="筛选数据">
<el-input
v-model="tableStore.table.params.searchValue"
placeholder="根据名称,容量查询"
/>
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" />
</div>
</template>
<script setup lang="tsx">
import { ref, onMounted, provide, reactive } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useDictData } from '@/stores/dictData'
const tableRef = ref()
const tableStore = new TableStore({
url: '/event-boot/report/getEventReport',
method: 'POST',
column: [
// 第一层:主标题(跨列)
{
title: '典型设备',
width: 300,
children: [
{ field: 'gdName', title: '名称' },
{ field: 'subName', title: '电压等级' },
{ field: 'ip', title: '容量' }
]
},
{
title: '各次谐波阻抗 (Ω)',
width: 1800, // 根据实际列数调整
children: Array.from({ length: 24 }, (_, i) => ({
field: `harm${i + 2}`,
title: `${i + 2}`
}))
}
],
resetCallback: () => {
}
})
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
})
</script>

View File

@@ -0,0 +1,80 @@
<template>
<div class="default-main">
<TableHeader>
<template v-slot:select>
<el-form-item label="筛选数据">
<el-input
v-model="tableStore.table.params.searchValue"
placeholder="根据名称,容量查询"
/>
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" />
</div>
</template>
<script setup lang="tsx">
import { ref, onMounted, provide, reactive } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useDictData } from '@/stores/dictData'
const tableRef = ref()
const tableStore = new TableStore({
url: '',
method: 'POST',
column: [
// 第一层:主标题(跨列)
{
title: '谐波源',
width: 300,
children: [
{ field: 'gdName', title: '名称' },
{ field: 'subName', title: '电压等级' },
{ field: 'ip', title: '容量' }
]
},
{
title: '各次谐波电流含量(%',
width: 1800, // 根据实际列数调整
children: Array.from({ length: 24 }, (_, i) => ({
field: `harm${i + 2}`,
title: `${i + 2}`
}))
}
],
})
provide('tableStore', tableStore)
const mockData = [
{
gdName: '变压器A',
subName: '10kV',
ip: '1000kVA',
...Array.from({ length: 24 }, (_, i) => ({ [`harm${i + 2}`]: (Math.random() * 10).toFixed(2) }))
.reduce((acc, cur) => ({ ...acc, ...cur }), {})
},
{
gdName: '电机B',
subName: '35kV',
ip: '2000kVA',
...Array.from({ length: 24 }, (_, i) => ({ [`harm${i + 2}`]: (Math.random() * 10).toFixed(2) }))
.reduce((acc, cur) => ({ ...acc, ...cur }), {})
},
{
gdName: '整流器C',
subName: '110kV',
ip: '5000kVA',
...Array.from({ length: 24 }, (_, i) => ({ [`harm${i + 2}`]: (Math.random() * 10).toFixed(2) }))
.reduce((acc, cur) => ({ ...acc, ...cur }), {})
}
]
onMounted(() => {
tableStore.index()
})
</script>

View File

@@ -0,0 +1,37 @@
<template>
<div class="default-main">
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="谐波阻抗数据库" name="1">
<HarmonicImpedanceTable />
</el-tab-pane>
<el-tab-pane label="谐波源数据库" name="2">
<HarmonicSourcesTable />
</el-tab-pane>
</el-tabs>
</div>
</template>
<script setup lang="ts">
import { onMounted, reactive, ref, provide } from 'vue'
import { mainHeight } from '@/utils/layout'
import HarmonicSourcesTable from './components/harmonicSources.vue'
import HarmonicImpedanceTable from './components/harmonicImpedance.vue'
defineOptions({
name: 'database/model'
})
const activeName = ref('1')
const layout = mainHeight(63) as any
</script>
<style lang="scss" scoped>
.bars_w {
width: 100%;
height: 500px;
}
:deep(.el-tabs__content) {
height: v-bind('layout.height');
overflow-y: auto;
}
</style>