review:【antd】【iot】设备分组
This commit is contained in:
@@ -3,7 +3,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace IotDeviceGroupApi {
|
export namespace IotDeviceGroupApi {
|
||||||
/** IoT 设备分组 VO */
|
/** 设备分组 */
|
||||||
export interface DeviceGroup {
|
export interface DeviceGroup {
|
||||||
id?: number; // 分组 ID
|
id?: number; // 分组 ID
|
||||||
name: string; // 分组名字
|
name: string; // 分组名字
|
||||||
|
|||||||
@@ -43,9 +43,7 @@ async function handleDelete(row: IotDeviceGroupApi.DeviceGroup) {
|
|||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDeviceGroup(row.id as number);
|
await deleteDeviceGroup(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
});
|
|
||||||
handleRefresh();
|
handleRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
@@ -55,7 +53,6 @@ async function handleDelete(row: IotDeviceGroupApi.DeviceGroup) {
|
|||||||
const [Grid, gridApi] = useVbenVxeGrid({
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
formOptions: {
|
formOptions: {
|
||||||
schema: useGridFormSchema(),
|
schema: useGridFormSchema(),
|
||||||
showCollapseButton: true,
|
|
||||||
},
|
},
|
||||||
gridOptions: {
|
gridOptions: {
|
||||||
columns: useGridColumns(),
|
columns: useGridColumns(),
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ import { useFormSchema } from '../data';
|
|||||||
|
|
||||||
defineOptions({ name: 'IoTDeviceGroupForm' });
|
defineOptions({ name: 'IoTDeviceGroupForm' });
|
||||||
|
|
||||||
|
// TODO @haohao:web-antd/src/views/iot/product/category/modules/product-category-form.vue 类似问题
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
success: [];
|
success: [];
|
||||||
}>();
|
}>();
|
||||||
|
|||||||
Reference in New Issue
Block a user