feat 批量处理选择
This commit is contained in:
@@ -39,15 +39,13 @@
|
|||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="flex justify-end mb8">
|
<el-row :gutter="10" class="flex justify-end mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['demo:demo:edit']" type="success" plain icon="Edit" :disabled="multiple" @click="handleBatchProcess"
|
<el-button type="success" plain icon="Edit" :disabled="multiple" @click="handleBatchProcess">批量处理</el-button>
|
||||||
>批量处理</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-table v-loading="loading" border :data="demoList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" border :data="demoList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" :selectable="checkSelectable" />
|
||||||
<el-table-column label="报警编号" align="center" prop="alarmCode" width="180" />
|
<el-table-column label="报警编号" align="center" prop="alarmCode" width="180" />
|
||||||
<el-table-column label="报警时间" align="center" prop="alarmTime" min-width="170" />
|
<el-table-column label="报警时间" align="center" prop="alarmTime" min-width="170" />
|
||||||
<el-table-column label="所属设备" align="center" prop="deviceName" min-width="120" show-overflow-tooltip />
|
<el-table-column label="所属设备" align="center" prop="deviceName" min-width="120" show-overflow-tooltip />
|
||||||
@@ -257,6 +255,11 @@ const handleUpdate = async (row: any) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** 检查行是否可选(已处理不可选) */
|
||||||
|
const checkSelectable = (row: any) => {
|
||||||
|
return row.status !== 1;
|
||||||
|
};
|
||||||
|
|
||||||
/** 批量:确认后直接提交 */
|
/** 批量:确认后直接提交 */
|
||||||
const handleBatchProcess = async () => {
|
const handleBatchProcess = async () => {
|
||||||
if (!ids.value.length) {
|
if (!ids.value.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user