|
|
|
@ -60,7 +60,11 @@
|
|
|
|
|
>
|
|
|
|
|
<template #operator class="table-operator">
|
|
|
|
|
<a-space>
|
|
|
|
|
<a-button type="primary" @click="form.onOpen(undefined, searchFormState.orgId)" v-if="hasPerm('bizUserAdd')">
|
|
|
|
|
<a-button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="form.onOpen(undefined, searchFormState.orgId)"
|
|
|
|
|
v-if="hasPerm('bizUserAdd')"
|
|
|
|
|
>
|
|
|
|
|
<template #icon><plus-outlined /></template>
|
|
|
|
|
<span>{{ $t('common.addButton') }}{{ $t('model.user') }}</span>
|
|
|
|
|
</a-button>
|
|
|
|
@ -72,17 +76,12 @@
|
|
|
|
|
<template #icon><delete-outlined /></template>
|
|
|
|
|
{{ $t('user.batchExportButton') }}
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-popconfirm
|
|
|
|
|
title="删除此信息?"
|
|
|
|
|
:visible="deleteVisible"
|
|
|
|
|
@visibleChange="deleteVisibleChange"
|
|
|
|
|
@confirm="deleteBatchUser"
|
|
|
|
|
>
|
|
|
|
|
<a-button danger v-if="hasPerm('bizUserBatchDelete')">
|
|
|
|
|
<template #icon><delete-outlined /></template>
|
|
|
|
|
{{ $t('common.batchRemoveButton') }}
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
<xn-batch-delete
|
|
|
|
|
v-if="hasPerm('bizUserBatchDelete')"
|
|
|
|
|
:buttonName="$t('common.batchRemoveButton')"
|
|
|
|
|
:selectedRowKeys="selectedRowKeys"
|
|
|
|
|
@batchDelete="deleteBatchUser"
|
|
|
|
|
/>
|
|
|
|
|
</a-space>
|
|
|
|
|
</template>
|
|
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
|
@ -222,7 +221,6 @@
|
|
|
|
|
const loading = ref(false)
|
|
|
|
|
const cardLoading = ref(true)
|
|
|
|
|
const ImpExpRef = ref()
|
|
|
|
|
const deleteVisible = ref(false)
|
|
|
|
|
// 表格查询 返回 Promise 对象
|
|
|
|
|
const loadData = (parameter) => {
|
|
|
|
|
return bizUserApi.userPage(Object.assign(parameter, searchFormState)).then((res) => {
|
|
|
|
@ -338,27 +336,8 @@
|
|
|
|
|
downloadUtil.resultDownload(res)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 批量删除校验
|
|
|
|
|
const deleteVisibleChange = () => {
|
|
|
|
|
if (deleteVisible.value) {
|
|
|
|
|
deleteVisible.value = false
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
if (selectedRowKeys.value.length < 1) {
|
|
|
|
|
message.warning('请选择一条或多条数据')
|
|
|
|
|
deleteVisible.value = false
|
|
|
|
|
return false
|
|
|
|
|
} else {
|
|
|
|
|
deleteVisible.value = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 批量删除
|
|
|
|
|
const deleteBatchUser = () => {
|
|
|
|
|
const params = selectedRowKeys.value.map((m) => {
|
|
|
|
|
return {
|
|
|
|
|
id: m
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const deleteBatchUser = (params) => {
|
|
|
|
|
bizUserApi.userDelete(params).then(() => {
|
|
|
|
|
table.value.clearRefreshSelected()
|
|
|
|
|
})
|
|
|
|
|