2025-09-11 13:14:36 +08:00
|
|
|
|
2025-09-11 08:46:12 +08:00
|
|
|
<template>
|
2025-12-09 20:04:55 +08:00
|
|
|
<div >
|
2025-09-11 13:14:36 +08:00
|
|
|
<TableHeader ref="TableHeaderRef">
|
2025-09-11 08:46:12 +08:00
|
|
|
<template v-slot:select>
|
2025-09-11 13:14:36 +08:00
|
|
|
<el-form-item label="名称">
|
|
|
|
|
<el-input v-model="tableStore.table.params.searchValue" clearable
|
|
|
|
|
placeholder="请输入搜索名称" maxlength="32" show-word-limit/>
|
2025-09-11 08:46:12 +08:00
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
</TableHeader>
|
2025-09-11 13:14:36 +08:00
|
|
|
|
|
|
|
|
<Table ref="tableRef" isGroup/>
|
2025-09-11 08:46:12 +08:00
|
|
|
</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({
|
2025-09-11 13:14:36 +08:00
|
|
|
url: '/supervision-boot/libModel/pageLibModelQuery',
|
2025-09-11 08:46:12 +08:00
|
|
|
method: 'POST',
|
2025-09-11 13:14:36 +08:00
|
|
|
showPage: true, // 确保启用分页
|
2025-12-09 20:04:55 +08:00
|
|
|
publicHeight: 60,
|
2025-09-11 08:46:12 +08:00
|
|
|
column: [
|
|
|
|
|
{
|
|
|
|
|
title: '典型设备',
|
|
|
|
|
children: [
|
2025-09-11 14:48:34 +08:00
|
|
|
{
|
|
|
|
|
field: 'index',
|
|
|
|
|
title: '序号',
|
|
|
|
|
width: '80',
|
|
|
|
|
formatter: (row: any) => {
|
|
|
|
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
|
|
|
|
}
|
|
|
|
|
},
|
2025-09-11 13:14:36 +08:00
|
|
|
{ field: 'name', title: '名称',minWidth: 200 },
|
|
|
|
|
{ field: 'voltage', title: '电压等级',minWidth: 100 },
|
|
|
|
|
{ field: 'capacity', title: '容量',minWidth: 100 }
|
2025-09-11 08:46:12 +08:00
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '各次谐波阻抗 (Ω)',
|
2025-09-11 13:14:36 +08:00
|
|
|
width: 1800,
|
2025-09-11 08:46:12 +08:00
|
|
|
children: Array.from({ length: 24 }, (_, i) => ({
|
2025-09-11 13:14:36 +08:00
|
|
|
field: `i${i + 2}`,
|
|
|
|
|
title: `${i + 2}次`,
|
|
|
|
|
minWidth: 100
|
2025-09-11 08:46:12 +08:00
|
|
|
}))
|
|
|
|
|
}
|
|
|
|
|
],
|
2025-09-11 13:14:36 +08:00
|
|
|
// 在请求发送前处理参数
|
|
|
|
|
beforeSearchFun: () => {
|
|
|
|
|
tableStore.table.params.pageSize = 100
|
|
|
|
|
},
|
|
|
|
|
resetCallback: () => {
|
|
|
|
|
tableStore.table.params.searchValue = ''
|
|
|
|
|
},
|
2025-09-11 08:46:12 +08:00
|
|
|
})
|
|
|
|
|
|
2025-09-11 13:14:36 +08:00
|
|
|
tableStore.table.params.type = 0
|
2025-09-11 08:46:12 +08:00
|
|
|
provide('tableStore', tableStore)
|
|
|
|
|
|
2025-09-11 13:14:36 +08:00
|
|
|
|
|
|
|
|
// 暴露查询方法给父组件调用
|
|
|
|
|
const queryData = () => {
|
2025-09-11 08:46:12 +08:00
|
|
|
tableStore.index()
|
2025-09-11 13:14:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
defineExpose({
|
|
|
|
|
queryData
|
2025-09-11 08:46:12 +08:00
|
|
|
})
|
2025-09-11 13:14:36 +08:00
|
|
|
|
|
|
|
|
|
2025-09-11 08:46:12 +08:00
|
|
|
</script>
|
2025-09-11 13:14:36 +08:00
|
|
|
|
|
|
|
|
|