批量删除 员工主播更新逻辑
This commit is contained in:
@@ -136,7 +136,10 @@
|
||||
<el-button @click="dialogAllocation = true">
|
||||
<Icon icon="ep:refresh" class="mr-5px" /> {{ t('newHosts.allocation') }}
|
||||
</el-button>
|
||||
|
||||
<el-button type="danger" plain :disabled="checkedIds.length === 0" @click="handleDeleteBatch"
|
||||
v-hasPermi="['system:post:delete']">
|
||||
<Icon icon="ep:delete" class="mr-5px" /> 批量删除
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
@@ -248,7 +251,7 @@ const queryParams = reactive({
|
||||
country: undefined,
|
||||
hostsKind: undefined,
|
||||
isAssigned: undefined,
|
||||
createTime: [],
|
||||
createTime: new Date().toISOString().split('T')[0] + ' 00:00:00',
|
||||
userId: undefined,
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
@@ -341,6 +344,23 @@ const handleDelete = async (id: number) => {
|
||||
} catch { }
|
||||
}
|
||||
|
||||
/** 批量删除按钮操作 */
|
||||
const checkedIds = ref<number[]>([])
|
||||
|
||||
|
||||
const handleDeleteBatch = async () => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起批量删除
|
||||
await NewHostsApi.deleteNewHostsList(checkedIds.value)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch { }
|
||||
}
|
||||
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
@@ -357,9 +377,10 @@ const handleExport = async () => {
|
||||
}
|
||||
//分配按钮操作
|
||||
const handleSelectionChange = (val) => {
|
||||
|
||||
checkedIds.value = val.map((row) => row.id)
|
||||
selectHostList.value = val
|
||||
console.log(selectHostList.value)
|
||||
console.log(checkedIds.value)
|
||||
}
|
||||
|
||||
//分配确认
|
||||
|
||||
Reference in New Issue
Block a user