feat: 完善功能

This commit is contained in:
teo 2025-11-10 16:31:44 +08:00
parent 40803462ac
commit 51278733fa

View File

@ -3,6 +3,14 @@ import { computed } from 'vue';
import { confirm, Page, useVbenModal } from '@vben/common-ui'; import { confirm, Page, useVbenModal } from '@vben/common-ui';
import {
Button as TButton,
Link as TLink,
Space as TSpace,
Switch as TSwitch,
} from 'tdesign-vue-next';
import { message } from '#/adapter/tdesign';
import { useVbenVxeGrid } from '#/adapter/vxe-table'; import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { changeAdminStatus, getAdminListByPage } from '#/api'; import { changeAdminStatus, getAdminListByPage } from '#/api';
import { toObject } from '#/enum'; import { toObject } from '#/enum';
@ -16,10 +24,6 @@ const [FormModel, formModelApi] = useVbenModal({
destroyOnClose: true, destroyOnClose: true,
}); });
import { message } from '#/adapter/tdesign';
import { Button as TButton, Space as TSpace, Switch as TSwitch, Link as TLink } from 'tdesign-vue-next';
function onStatusChange(value: any, row: any) { function onStatusChange(value: any, row: any) {
confirm(`确认${value === 1 ? '启用' : '禁用'}用户`, `切换状态`) confirm(`确认${value === 1 ? '启用' : '禁用'}用户`, `切换状态`)
.then(async () => { .then(async () => {
@ -123,7 +127,7 @@ const deptOptionsMap = computed(() => {
<template #actions="{ row }"> <template #actions="{ row }">
<TSpace> <TSpace>
<TLink theme="primary" @click="editEvent(row)">编辑</TLink> <TLink theme="primary" @click="editEvent(row)">编辑</TLink>
</TSpace> </TSpace>
</template> </template>
</Grid> </Grid>