Files
pqs-9100_client/frontend/src/views/machine/device/components/monitorTab.vue
2024-11-26 15:41:20 +08:00

74 lines
2.0 KiB
Vue

<!-- components/MonitorPointTable.vue -->
<template>
<el-tab-pane label="监测点台账信息" v-if="MonIsShow">
<div class='table-box' ref='popupBaseView'>
<ProTable
ref='proTable'
:columns='columns'
>
<!-- 表格 header 按钮 -->
<template #tableHeader='scope'>
<el-button type='primary' :icon='CirclePlus'>新增</el-button>
<el-button type='danger' :icon='Delete' plain :disabled='!scope.isSelected'>批量删除</el-button>
</template>
<!-- 表格操作 -->
<template #operation>
<el-button type='primary' link :icon='EditPen'>复制</el-button>
<el-button type='primary' link :icon='EditPen'>编辑</el-button>
<el-button type='primary' link :icon='Delete'>删除</el-button>
</template>
</ProTable>
</div>
</el-tab-pane>
</template>
<script setup lang="ts">
import { ref, defineProps, reactive } from 'vue';
import ProTable from '@/components/ProTable/index.vue'; // 假设 ProTable 是自定义组件
import { CirclePlus, Delete, EditPen } from '@element-plus/icons-vue';
import { getPqMonList } from '@/api/device/monitor'
import { type ColumnProps } from '@/components/ProTable/interface'
import { type Monitor } from '@/api/device/interface/monitor'
// 表格配置项
const columns = reactive<ColumnProps<Monitor.ResPqMon>[]>([
{ type: 'selection', fixed: 'left', width: 70 },
{ type: 'index', fixed: 'left', width: 70, label: '序号' },
{
prop: '',
label: '所属母线',
width: 200,
},
{
prop: '',
label: '被检通道',
width: 200,
},
{
prop: '',
label: 'PT变比',
width: 110,
},
{
prop: '',
label: 'CT变比',
width: 130,
},
{
prop: '',
label: '接线方式',
width: 130,
},
{
prop: '',
label: '谐波系统监测点ID',
minWidth: 250,
},
{ prop: 'operation', label: '操作', fixed: 'right', width: 200 },
])
</script>