60 lines
1.6 KiB
Vue
60 lines
1.6 KiB
Vue
|
|
<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>
|