From 87300563dd4a93b5cbdaf0c998c78af4c2028db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E6=B5=A9=E6=B5=A9?= <1036606149@qq.com> Date: Sat, 14 Dec 2024 21:52:25 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E3=80=91IoT=EF=BC=9A=E5=A2=9E=E5=8A=A0=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E5=8C=85=E6=8B=AC=E6=8F=92=E4=BB=B6=E4=BF=A1=E6=81=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=92=8C=E8=A1=A8=E5=8D=95=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/plugininfo/index.ts | 51 ++++ src/utils/dict.ts | 5 +- src/views/iot/plugininfo/PluginInfoForm.vue | 106 ++++++++ src/views/iot/plugininfo/detail.vue | 44 ++++ src/views/iot/plugininfo/index.vue | 257 ++++++++++++++++++++ 5 files changed, 462 insertions(+), 1 deletion(-) create mode 100644 src/api/iot/plugininfo/index.ts create mode 100644 src/views/iot/plugininfo/PluginInfoForm.vue create mode 100644 src/views/iot/plugininfo/detail.vue create mode 100644 src/views/iot/plugininfo/index.vue diff --git a/src/api/iot/plugininfo/index.ts b/src/api/iot/plugininfo/index.ts new file mode 100644 index 00000000..03229f70 --- /dev/null +++ b/src/api/iot/plugininfo/index.ts @@ -0,0 +1,51 @@ +import request from '@/config/axios' + +// IoT 插件信息 VO +export interface PluginInfoVO { + id: number // 主键ID + pluginId: string // 插件包id + name: string // 插件名称 + description: string // 描述 + deployType: number // 部署方式 + file: string // 插件包文件名 + version: string // 插件版本 + type: number // 插件类型 + protocol: string // 设备插件协议类型 + status: number // 状态 + configSchema: string // 插件配置项描述信息 + config: string // 插件配置信息 + script: string // 插件脚本 +} + +// IoT 插件信息 API +export const PluginInfoApi = { + // 查询IoT 插件信息分页 + getPluginInfoPage: async (params: any) => { + return await request.get({ url: `/iot/plugin-info/page`, params }) + }, + + // 查询IoT 插件信息详情 + getPluginInfo: async (id: number) => { + return await request.get({ url: `/iot/plugin-info/get?id=` + id }) + }, + + // 新增IoT 插件信息 + createPluginInfo: async (data: PluginInfoVO) => { + return await request.post({ url: `/iot/plugin-info/create`, data }) + }, + + // 修改IoT 插件信息 + updatePluginInfo: async (data: PluginInfoVO) => { + return await request.put({ url: `/iot/plugin-info/update`, data }) + }, + + // 删除IoT 插件信息 + deletePluginInfo: async (id: number) => { + return await request.delete({ url: `/iot/plugin-info/delete?id=` + id }) + }, + + // 导出IoT 插件信息 Excel + exportPluginInfo: async (params) => { + return await request.download({ url: `/iot/plugin-info/export-excel`, params }) + } +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 1134152b..5538ed60 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -239,5 +239,8 @@ export enum DICT_TYPE { IOT_PRODUCT_FUNCTION_TYPE = 'iot_product_function_type', // IOT 产品功能类型 IOT_DATA_TYPE = 'iot_data_type', // IOT 数据类型 IOT_UNIT_TYPE = 'iot_unit_type', // IOT 单位类型 - IOT_RW_TYPE = 'iot_rw_type' // IOT 读写类型 + IOT_RW_TYPE = 'iot_rw_type', // IOT 读写类型 + IOT_PLUGIN_DEPLOY_TYPE = 'iot_plugin_deploy_type', // IOT 插件部署类型 + IOT_PLUGIN_STATUS = 'iot_plugin_status', // IOT 插件状态 + IOT_PLUGIN_TYPE = 'iot_plugin_type' // IOT 插件类型 } diff --git a/src/views/iot/plugininfo/PluginInfoForm.vue b/src/views/iot/plugininfo/PluginInfoForm.vue new file mode 100644 index 00000000..8c8233c9 --- /dev/null +++ b/src/views/iot/plugininfo/PluginInfoForm.vue @@ -0,0 +1,106 @@ + + \ No newline at end of file diff --git a/src/views/iot/plugininfo/detail.vue b/src/views/iot/plugininfo/detail.vue new file mode 100644 index 00000000..2f3f02f9 --- /dev/null +++ b/src/views/iot/plugininfo/detail.vue @@ -0,0 +1,44 @@ + + + diff --git a/src/views/iot/plugininfo/index.vue b/src/views/iot/plugininfo/index.vue new file mode 100644 index 00000000..5591cef4 --- /dev/null +++ b/src/views/iot/plugininfo/index.vue @@ -0,0 +1,257 @@ + + + \ No newline at end of file