模型库
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader>
|
||||
<TableHeader ref="TableHeaderRef">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
placeholder="根据名称,容量查询"
|
||||
/>
|
||||
<el-form-item label="名称">
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable
|
||||
placeholder="请输入搜索名称" maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
|
||||
<Table ref="tableRef" isGroup/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="tsx">
|
||||
@@ -23,37 +23,51 @@ import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const tableRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/event-boot/report/getEventReport',
|
||||
url: '/supervision-boot/libModel/pageLibModelQuery',
|
||||
method: 'POST',
|
||||
showPage: true, // 确保启用分页
|
||||
column: [
|
||||
// 第一层:主标题(跨列)
|
||||
{
|
||||
title: '典型设备',
|
||||
width: 300,
|
||||
children: [
|
||||
{ field: 'gdName', title: '名称' },
|
||||
{ field: 'subName', title: '电压等级' },
|
||||
{ field: 'ip', title: '容量' }
|
||||
{ field: 'name', title: '名称',minWidth: 200 },
|
||||
{ field: 'voltage', title: '电压等级',minWidth: 100 },
|
||||
{ field: 'capacity', title: '容量',minWidth: 100 }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '各次谐波阻抗 (Ω)',
|
||||
width: 1800, // 根据实际列数调整
|
||||
width: 1800,
|
||||
children: Array.from({ length: 24 }, (_, i) => ({
|
||||
field: `harm${i + 2}`,
|
||||
title: `${i + 2}次`
|
||||
field: `i${i + 2}`,
|
||||
title: `${i + 2}次`,
|
||||
minWidth: 100
|
||||
}))
|
||||
}
|
||||
],
|
||||
resetCallback: () => {
|
||||
|
||||
}
|
||||
// 在请求发送前处理参数
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.pageSize = 100
|
||||
},
|
||||
resetCallback: () => {
|
||||
tableStore.table.params.searchValue = ''
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
tableStore.table.params.type = 0
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
// 暴露查询方法给父组件调用
|
||||
const queryData = () => {
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
queryData
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user