微调
This commit is contained in:
@@ -5,13 +5,14 @@
|
||||
:columns='columns'
|
||||
:data='errorData'
|
||||
type='selection'
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<!-- 表格 header 按钮 -->
|
||||
<template #tableHeader>
|
||||
<el-button type='primary' :icon='CirclePlus' @click="openAddDialog">新增误差体系</el-button>
|
||||
<el-button type='danger' :icon='Delete' plain
|
||||
<el-button type='primary' :icon='CirclePlus' @click="openAddDialog">新增</el-button>
|
||||
<el-button type='danger' :icon='Delete' plain :disabled='!multipleSelection.length'
|
||||
>
|
||||
批量删除误差体系
|
||||
批量删除
|
||||
</el-button>
|
||||
</template>
|
||||
<!-- 表格操作 -->
|
||||
@@ -84,20 +85,22 @@ const columns = reactive<ColumnProps<ErrorSystem.ErrorSystemList>[]>([
|
||||
{
|
||||
prop: 'name',
|
||||
label: '误差体系名称',
|
||||
width: 300,
|
||||
|
||||
},
|
||||
{
|
||||
prop: 'year',
|
||||
label: '标准实施年份',
|
||||
width: 200,
|
||||
search: { el: 'input' },
|
||||
},
|
||||
|
||||
{
|
||||
prop: 'level',
|
||||
label: '适用设备等级',
|
||||
width: 200,
|
||||
search: { el: 'select', props: { filterable: true } },
|
||||
},
|
||||
{ prop: 'operation', label: '操作', fixed: 'right' },
|
||||
{ prop: 'operation', label: '操作', fixed: 'right' ,width: 400, },
|
||||
])
|
||||
|
||||
// 打开编辑对话框
|
||||
@@ -122,6 +125,14 @@ const openAddDialog = () => {
|
||||
dialogFormVisible.value = true; // 打开对话框
|
||||
};
|
||||
|
||||
//选中
|
||||
// 处理选择变化
|
||||
const handleSelectionChange = (selection:ErrorSystem.ErrorSystemList[]) => {
|
||||
multipleSelection.value = selection.map(row => row.id); // 更新选中的行
|
||||
|
||||
};
|
||||
|
||||
|
||||
const handleRowClick = (errorSystem: ErrorSystem.ErrorSystemList) =>{
|
||||
detail_dialogTitle.value = errorSystem.name;
|
||||
detail_dialogFormVisible.value = true; // 显示对话框
|
||||
|
||||
Reference in New Issue
Block a user