diff --git a/src/api/iot/product/product/index.ts b/src/api/iot/product/product/index.ts index e9dfdcaf..496fb049 100644 --- a/src/api/iot/product/product/index.ts +++ b/src/api/iot/product/product/index.ts @@ -8,6 +8,8 @@ export interface ProductVO { protocolId: number // 协议编号 categoryId: number // 产品所属品类标识符 categoryName?: string // 产品所属品类名称 + icon: string // 产品图标 + picUrl: string // 产品图片 description: string // 产品描述 validateType: number // 数据校验级别 status: number // 产品状态 @@ -17,7 +19,6 @@ export interface ProductVO { dataFormat: number // 数据格式 deviceCount: number // 设备数量 createTime: Date // 创建时间 - picUrl: string // 产品图片 URL } // IOT 数据校验级别枚举类 diff --git a/src/assets/imgs/iot/device.png b/src/assets/imgs/iot/device.png new file mode 100644 index 00000000..79339cdf Binary files /dev/null and b/src/assets/imgs/iot/device.png differ diff --git a/src/assets/svgs/iot/cube.svg b/src/assets/svgs/iot/cube.svg new file mode 100644 index 00000000..200ac1b1 --- /dev/null +++ b/src/assets/svgs/iot/cube.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/iot/product/product/ProductForm.vue b/src/views/iot/product/product/ProductForm.vue index b974717b..f7fe4087 100644 --- a/src/views/iot/product/product/ProductForm.vue +++ b/src/views/iot/product/product/ProductForm.vue @@ -7,10 +7,10 @@ label-width="110px" v-loading="formLoading" > - + @@ -145,7 +145,7 @@ const formData = ref({ validateType: ValidateTypeEnum.WEAK }) const formRules = reactive({ - productKey: [{ required: true, message: '产品标识不能为空', trigger: 'blur' }], + productKey: [{ required: true, message: 'ProductKey 不能为空', trigger: 'blur' }], name: [{ required: true, message: '产品名称不能为空', trigger: 'blur' }], categoryId: [{ required: true, message: '产品分类不能为空', trigger: 'change' }], deviceType: [{ required: true, message: '设备类型不能为空', trigger: 'change' }], diff --git a/src/views/iot/product/product/index.vue b/src/views/iot/product/product/index.vue index 21ae605d..09bd1773 100644 --- a/src/views/iot/product/product/index.vue +++ b/src/views/iot/product/product/index.vue @@ -63,49 +63,93 @@ -
+
-
- -
-
{{ item.name }}
-
{{ item.productKey }}
+ +
+ +
+
+ +
+
{{ item.name }}
+
+ + +
+
+
+ 产品分类 + {{ item.categoryName }} +
+
+ 产品类型 + +
+
+ 产品标识 + {{ item.productKey }} +
+
+
+ +
+
+ + + + + +
+ + + 编辑 + + + + 详情 + + + + 物模型 + +
+ + +
-
-
- {{ item.categoryName }} - -
-
- - 编辑 - - - 删除 -
@@ -199,6 +243,8 @@ import { ProductApi, ProductVO } from '@/api/iot/product/product' import ProductForm from './ProductForm.vue' import { DICT_TYPE } from '@/utils/dict' import download from '@/utils/download' +import defaultPicUrl from '@/assets/imgs/iot/device.png' +import defaultIconUrl from '@/assets/svgs/iot/cube.svg' /** iot 产品列表 */ defineOptions({ name: 'IoTProduct' }) @@ -216,7 +262,7 @@ const queryParams = reactive({ productKey: undefined }) const queryFormRef = ref() // 搜索的表单 -const exportLoading = ref(false) // 导出的加载中 +const exportLoading = ref(false) // 导出加载中 const viewMode = ref<'card' | 'list'>('card') // 视图模式状态 /** 查询列表 */