From c1c89099b276f82f89ae36e7837946f98e3b4fb5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B9=E7=A3=8A?= <45566618@qq.com>
Date: Sat, 28 Feb 2026 17:11:10 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E7=BB=9C=E8=AE=BE=E5=A4=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../camera/components/CameraInfoForm.vue | 45 ++--
.../camera/components/ConfigInfoForm.vue | 10 +-
src/views/iot/tplink/camera/index.vue | 3 +-
.../network/components/ConfigInfoForm.vue | 211 ++++++++++++++++++
.../tplink/network/components/DrawerModal.vue | 137 ++++++++++++
.../network/components/NetworkInfoForm.vue | 210 +++++++++++++++++
src/views/iot/tplink/network/index.vue | 172 ++++++++++++++
src/views/iot/tplink/network/network.api.ts | 53 +++++
src/views/iot/tplink/network/network.data.ts | 101 +++++++++
9 files changed, 927 insertions(+), 15 deletions(-)
create mode 100644 src/views/iot/tplink/network/components/ConfigInfoForm.vue
create mode 100644 src/views/iot/tplink/network/components/DrawerModal.vue
create mode 100644 src/views/iot/tplink/network/components/NetworkInfoForm.vue
create mode 100644 src/views/iot/tplink/network/index.vue
create mode 100644 src/views/iot/tplink/network/network.api.ts
create mode 100644 src/views/iot/tplink/network/network.data.ts
diff --git a/src/views/iot/tplink/camera/components/CameraInfoForm.vue b/src/views/iot/tplink/camera/components/CameraInfoForm.vue
index ed391ad..75f33d1 100644
--- a/src/views/iot/tplink/camera/components/CameraInfoForm.vue
+++ b/src/views/iot/tplink/camera/components/CameraInfoForm.vue
@@ -10,6 +10,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -22,23 +36,26 @@
-
-
-
-
-
-
-
-
+
+ placeholder="请选择在线状态" allow-clear />
-
-
+
+
+ 已分配
+ 未分配
+
+
+
+
+
+
+
+
@@ -111,10 +128,12 @@ const emit = defineEmits(['register', 'ok']);
const formData = reactive>({
id: '',
deviceIndex: '',
- deviceType: '',
deviceName: '',
- deviceStatus: '',
deviceModel: '',
+ deviceType: '',
+ deviceStatus: '',
+ izAllocate: '',
+ mac: '',
ftpIp: undefined,
ftpPort: undefined,
ftpUsername: undefined,
diff --git a/src/views/iot/tplink/camera/components/ConfigInfoForm.vue b/src/views/iot/tplink/camera/components/ConfigInfoForm.vue
index e78c2af..2704800 100644
--- a/src/views/iot/tplink/camera/components/ConfigInfoForm.vue
+++ b/src/views/iot/tplink/camera/components/ConfigInfoForm.vue
@@ -59,6 +59,13 @@
+
+
+
+
+
+
+
@@ -91,7 +98,8 @@ const formData = reactive>({
ftpPort: '',
ftpUsername: '',
ftpPassword: '',
- ftpUploadpath: ''
+ ftpUploadpath: '',
+ updateDate: ''
});
const { createMessage } = useMessage();
const labelCol = ref({ xs: { span: 24 }, sm: { span: 5 } });
diff --git a/src/views/iot/tplink/camera/index.vue b/src/views/iot/tplink/camera/index.vue
index bdfa21e..2881f16 100644
--- a/src/views/iot/tplink/camera/index.vue
+++ b/src/views/iot/tplink/camera/index.vue
@@ -101,7 +101,7 @@ const confirmLoading = ref(false);
//注册table数据
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
- title: '摄像头信息',
+ title: '监控设备',
api: list,
columns,
canResize: false,
@@ -114,6 +114,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
fixed: 'right',
},
beforeFetch: async (params) => {
+ queryParam.routeType = 'camera';
return Object.assign(params, queryParam);
},
},
diff --git a/src/views/iot/tplink/network/components/ConfigInfoForm.vue b/src/views/iot/tplink/network/components/ConfigInfoForm.vue
new file mode 100644
index 0000000..a450e08
--- /dev/null
+++ b/src/views/iot/tplink/network/components/ConfigInfoForm.vue
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/tplink/network/components/DrawerModal.vue b/src/views/iot/tplink/network/components/DrawerModal.vue
new file mode 100644
index 0000000..148ebd4
--- /dev/null
+++ b/src/views/iot/tplink/network/components/DrawerModal.vue
@@ -0,0 +1,137 @@
+
+
+
+ 关闭
+ 确认
+
+
+
+
+
+
+
+ 关闭
+ 确认
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/tplink/network/components/NetworkInfoForm.vue b/src/views/iot/tplink/network/components/NetworkInfoForm.vue
new file mode 100644
index 0000000..3e58328
--- /dev/null
+++ b/src/views/iot/tplink/network/components/NetworkInfoForm.vue
@@ -0,0 +1,210 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 交换机
+ 路由器
+ 无线AP
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 已分配
+ 未分配
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/tplink/network/index.vue b/src/views/iot/tplink/network/index.vue
new file mode 100644
index 0000000..7c727ce
--- /dev/null
+++ b/src/views/iot/tplink/network/index.vue
@@ -0,0 +1,172 @@
+
+
+
+
+
+
+
+
+ 拉取设备
+ 更新状态
+ 配置管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/tplink/network/network.api.ts b/src/views/iot/tplink/network/network.api.ts
new file mode 100644
index 0000000..783a17f
--- /dev/null
+++ b/src/views/iot/tplink/network/network.api.ts
@@ -0,0 +1,53 @@
+import { defHttp } from '/@/utils/http/axios';
+
+enum Api {
+ list = '/iot/tplink/cameraInfo/list',
+ syncAllDevices = '/iot/tplink/cameraInfo/syncAllDevices',
+ syncDevicesStatus = '/iot/tplink/cameraInfo/syncDevicesStatus',
+ edit = '/iot/tplink/cameraInfo/edit',
+ getConfig = '/iot/tplink/config/getByCode',
+ addConfig = '/iot/tplink/config/add',
+ editConfig = '/iot/tplink/config/edit',
+}
+
+/**
+ * 列表接口
+ * @param params
+ */
+export const list = (params) => defHttp.get({ url: Api.list, params });
+
+/**
+ * 所有网络设备
+ * @param params
+ */
+export const syncAllDevices = (params) => defHttp.get({ url: Api.syncAllDevices, params });
+
+/**
+ * 同步设备在线状态
+ * @param params
+ */
+export const syncDevicesStatus = (params) => defHttp.get({ url: Api.syncDevicesStatus, params });
+
+/**
+ * 更新
+ * @param params
+ */
+export const update = (params) => {
+ return defHttp.post({ url: Api.edit, params },{ isTransformResponse: false });
+}
+
+/**
+ * 获取配置数据
+ * @param params
+ */
+export const getConfig = (params) => defHttp.get({ url: Api.getConfig, params });
+
+/**
+ * 保存或者更新配置
+ * @param params
+ * @param isUpdate
+ */
+export const saveOrUpdateConfig = (params, isUpdate) => {
+ let url = isUpdate ? Api.editConfig : Api.addConfig;
+ return defHttp.post({ url: url, params }, { isTransformResponse: false });
+};
diff --git a/src/views/iot/tplink/network/network.data.ts b/src/views/iot/tplink/network/network.data.ts
new file mode 100644
index 0000000..330e41e
--- /dev/null
+++ b/src/views/iot/tplink/network/network.data.ts
@@ -0,0 +1,101 @@
+import {BasicColumn} from '/@/components/Table';
+import {FormSchema} from '/@/components/Table';
+import dayjs from 'dayjs';
+
+//列表数据
+export const columns: BasicColumn[] = [
+ {
+ title: '设备序号',
+ align: "center",
+ dataIndex: 'deviceIndex'
+ },
+ {
+ title: '设备标识',
+ align: "center",
+ dataIndex: 'deviceName'
+ },
+ {
+ title: '设备型号',
+ align: "center",
+ dataIndex: 'deviceModel'
+ },
+ {
+ title: '设备类型',
+ align: "center",
+ dataIndex: 'deviceType',
+ customRender: ({record}) => {
+ if (record.deviceType == 'SWITCH') {
+ return "交换机";
+ }
+ if (record.deviceType == 'ROUTER') {
+ return "路由器";
+ }
+ if (record.deviceType == 'AP') {
+ return "无线AP";
+ }
+ }
+ },
+ {
+ title: '在线状态',
+ align: "center",
+ dataIndex: 'deviceStatus_dictText'
+ },
+ {
+ title: '分配状态',
+ align: "center",
+ dataIndex: 'izAllocate',
+ customRender:({record})=>{
+ if(record.izAllocate=='Y'){
+ return "已分配";
+ }else{
+ return "未分配";
+ }
+ },
+ },
+ {
+ title: 'MAC地址',
+ align: "center",
+ dataIndex: 'mac'
+ }
+];
+
+export const searchFormSchema: FormSchema[] = [
+ {
+ label: '设备类型',
+ field: 'deviceType',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择设备类型',
+ options: [
+ { label: '交换机', value: 'SWITCH' },
+ { label: '路由器', value: 'ROUTER' },
+ { label: '无线AP', value: 'AP' },
+ ],
+ },
+ //colProps: { span: 6 },
+ },
+ {
+ label: '在线状态',
+ field: 'deviceStatus',
+ component: 'JDictSelectTag',
+ componentProps: {
+ dictCode: 'tplink_status',
+ placeholder: '请选择状态',
+ stringToNumber: true,
+ },
+ //colProps: { span: 6 },
+ },
+ {
+ label: '分配状态',
+ field: 'izAllocate',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择分配状态',
+ options: [
+ { label: '已分配', value: 'Y' },
+ { label: '未分配', value: 'N' },
+ ],
+ },
+ //colProps: { span: 6 },
+ },
+];