diff --git a/src/api/iot/plugininfo/index.ts b/src/api/iot/plugininfo/index.ts index 03229f70..91459063 100644 --- a/src/api/iot/plugininfo/index.ts +++ b/src/api/iot/plugininfo/index.ts @@ -47,5 +47,15 @@ export const PluginInfoApi = { // 导出IoT 插件信息 Excel exportPluginInfo: async (params) => { return await request.download({ url: `/iot/plugin-info/export-excel`, params }) + }, + + // 修改IoT 插件状态 + updatePluginStatus: async (data: any) => { + return await request.put({ url: `/iot/plugin-info/update-status`, data }) + }, + + // 上传Jar包 + uploadPluginFile: async (data: any) => { + return await request.post({ url: `/iot/plugin-info/upload-file`, data }) } } diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 8b4bbe0e..2619e6bf 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -638,6 +638,17 @@ const remainingRouter: AppRouteRecordRaw[] = [ activeMenu: '/iot/device' }, component: () => import('@/views/iot/device/device/detail/index.vue') + }, + { + path: 'plugin/detail/:id', + name: 'IoTPluginDetail', + meta: { + title: '插件详情', + noCache: true, + hidden: true, + activeMenu: '/iot/plugin' + }, + component: () => import('@/views/iot/plugin/detail/index.vue') } ] } diff --git a/src/views/iot/plugininfo/PluginInfoForm.vue b/src/views/iot/plugin/PluginInfoForm.vue similarity index 100% rename from src/views/iot/plugininfo/PluginInfoForm.vue rename to src/views/iot/plugin/PluginInfoForm.vue diff --git a/src/views/iot/plugin/detail/PluginImportForm.vue b/src/views/iot/plugin/detail/PluginImportForm.vue new file mode 100644 index 00000000..a0594444 --- /dev/null +++ b/src/views/iot/plugin/detail/PluginImportForm.vue @@ -0,0 +1,99 @@ + + diff --git a/src/views/iot/plugin/detail/index.vue b/src/views/iot/plugin/detail/index.vue new file mode 100644 index 00000000..83eadc63 --- /dev/null +++ b/src/views/iot/plugin/detail/index.vue @@ -0,0 +1,101 @@ + + + \ No newline at end of file diff --git a/src/views/iot/plugininfo/index.vue b/src/views/iot/plugin/index.vue similarity index 67% rename from src/views/iot/plugininfo/index.vue rename to src/views/iot/plugin/index.vue index 5591cef4..0f64bc8d 100644 --- a/src/views/iot/plugininfo/index.vue +++ b/src/views/iot/plugin/index.vue @@ -45,25 +45,11 @@ 新增 - - - - - - - - - - - - + @@ -88,6 +74,14 @@ /> @@ -123,57 +110,6 @@ /> - - -
- -
-
-
{{ item.name }}
-
组件ID: {{ item.pluginId }}
-
-
-
-
Jar包: {{ item.file }}
-
版本号: {{ item.version }}
-
部署方式:
-
状态:
-
-
- - 编辑 - - - 删除 - -
-
-
- - -
- @@ -185,7 +121,7 @@ import { PluginInfoApi, PluginInfoVO } from '@/api/iot/plugininfo' import PluginInfoForm from './PluginInfoForm.vue' /** IoT 插件信息 列表 */ -defineOptions({ name: 'PluginInfo' }) +defineOptions({ name: 'IoTPlugin' }) const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 @@ -200,7 +136,6 @@ const queryParams = reactive({ status: undefined }) const queryFormRef = ref() // 搜索的表单 -const viewType = ref<'card' | 'table'>('table') // 视图类型,默认为表格视图 /** 查询列表 */ const getList = async () => { @@ -232,6 +167,12 @@ const openForm = (type: string, id?: number) => { formRef.value.open(type, id) } +/** 打开详情 */ +const { push } = useRouter() +const openDetail = (id: number) => { + push({ name: 'IoTPluginDetail', params: { id } }) +} + /** 删除按钮操作 */ const handleDelete = async (id: number) => { try { @@ -245,13 +186,8 @@ const handleDelete = async (id: number) => { } catch {} } -/** 查看详情操作 */ -const viewDetail = (id: number) => { - router.push({ path: `/iot/plugininfo/detail/${id}` }) -} - /** 初始化 **/ onMounted(() => { getList() }) - \ No newline at end of file + diff --git a/src/views/iot/plugininfo/detail.vue b/src/views/iot/plugininfo/detail.vue deleted file mode 100644 index 2f3f02f9..00000000 --- a/src/views/iot/plugininfo/detail.vue +++ /dev/null @@ -1,44 +0,0 @@ - - -