refactor:【antd】【iot】将物联网设备和产品枚举整合为常量,优化设备导入功能,简化设备管理UI组件
This commit is contained in:
@@ -12,6 +12,8 @@ import { downloadFileFromBlobPart } from '@vben/utils';
|
||||
|
||||
import { Button, Card, Input, message, Space } from 'ant-design-vue';
|
||||
|
||||
import { ProductStatusEnum } from '@vben/constants';
|
||||
|
||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { getSimpleProductCategoryList } from '#/api/iot/product/category';
|
||||
import {
|
||||
@@ -253,6 +255,7 @@ onMounted(() => {
|
||||
type: 'link',
|
||||
danger: true,
|
||||
icon: ACTION_ICON.DELETE,
|
||||
disabled: row.status === ProductStatusEnum.PUBLISHED,
|
||||
popConfirm: {
|
||||
title: `确认删除产品 ${row.name} 吗?`,
|
||||
confirm: handleDelete.bind(null, row),
|
||||
|
||||
@@ -7,10 +7,9 @@ import { useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import { Button, Card, Descriptions, message, Modal } from 'ant-design-vue';
|
||||
|
||||
import {
|
||||
ProductStatusEnum,
|
||||
updateProductStatus,
|
||||
} from '#/api/iot/product/product';
|
||||
import { ProductStatusEnum } from '@vben/constants';
|
||||
|
||||
import { updateProductStatus } from '#/api/iot/product/product';
|
||||
|
||||
import Form from '../../form.vue';
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { DICT_TYPE } from '@vben/constants';
|
||||
|
||||
import { Card, Descriptions } from 'ant-design-vue';
|
||||
|
||||
import { DeviceTypeEnum } from '#/api/iot/product/product';
|
||||
import { DeviceTypeEnum } from '@vben/constants';
|
||||
import { DictTag } from '#/components/dict-tag';
|
||||
|
||||
interface Props {
|
||||
|
||||
Reference in New Issue
Block a user