From 94e37d2beee14cf384bd129c64cf55c32f7c12ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B9=E7=A3=8A?= <45566618@qq.com>
Date: Wed, 8 Apr 2026 17:46:41 +0800
Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E8=81=94=E8=AE=BE=E5=A4=87=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E5=90=8C=E6=AD=A5=E6=8E=A8=E9=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/batch/DeviceBatchList.vue | 48 ++++++++++++-------
.../components/integration/CameraList.vue | 15 +++++-
.../integration/ElectricityList.vue | 16 ++++++-
.../components/integration/HumidList.vue | 15 +++++-
.../components/integration/NetworkList.vue | 15 +++++-
.../components/integration/WaterList.vue | 15 +++++-
.../components/integration/integration.api.ts | 13 ++++-
.../integration/integration.data.ts | 6 +++
8 files changed, 115 insertions(+), 28 deletions(-)
diff --git a/src/views/device/manager/components/batch/DeviceBatchList.vue b/src/views/device/manager/components/batch/DeviceBatchList.vue
index 05fadb1..f54d34d 100644
--- a/src/views/device/manager/components/batch/DeviceBatchList.vue
+++ b/src/views/device/manager/components/batch/DeviceBatchList.vue
@@ -32,19 +32,21 @@
+
-
-
-
- 新增批次
-
-
-
-
-
-
-
-
+
+
+
+ 新增批次
+
+
+
+
+
+
+
+
+
@@ -61,12 +63,15 @@ import { useUserStore } from '/@/store/modules/user';
import DeviceBatchFormModal from './DeviceBatchFormModal.vue';
import DepartPreviewModal from "../preview/DepartPreviewModal.vue";
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
+import {changeTheme} from "@/logics/theme";
const formRef = ref();
const queryParam = reactive({});
const deviceBatchDrawer = ref();
const previewDrawer = ref();
const orgCode = ref('');
+const confirmLoading = ref(false);
+const izShow = ref(true);
const userStore = useUserStore();
//注册table数据
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
@@ -134,8 +139,17 @@ function handlePreview(record: Recordable){
* 推送
*/
async function handleSend(record: Recordable){
- await sendBatch(record);
- reload();
+ izShow.value = false;
+ confirmLoading.value = true;
+ await sendBatch(record).then((res) => {
+ setTimeout(() => {
+ reload();
+ }, 8000);
+ }).finally(() => {
+ setTimeout(() => {
+ confirmLoading.value = false;
+ }, 8000);
+ });
}
/**
@@ -167,12 +181,12 @@ function getTableAction(record) {
{
label: '推送清单',
onClick: handleSend.bind(null, record),
- ifShow: record.izPush == 'N' && record.childrenCn > 0
+ ifShow: record.izPush == 'N' && record.childrenCn > 0 && izShow.value
},
{
label: '编辑',
onClick: handleEdit.bind(null, record),
- ifShow: record.izPush == 'N'
+ ifShow: record.izPush == 'N' && izShow.value
},
{
label: '删除',
@@ -180,7 +194,7 @@ function getTableAction(record) {
title: '是否确定删除?',
confirm: handleDelete.bind(null, record),
},
- ifShow: record.izPush == 'N'
+ ifShow: record.izPush == 'N' && izShow.value
},
];
}
diff --git a/src/views/device/manager/components/integration/CameraList.vue b/src/views/device/manager/components/integration/CameraList.vue
index 49489f8..c3932f6 100644
--- a/src/views/device/manager/components/integration/CameraList.vue
+++ b/src/views/device/manager/components/integration/CameraList.vue
@@ -33,7 +33,7 @@ import { ref, reactive} from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { deviceColumns } from './integration.data';
-import { cameraList } from './integration.api';
+import {cameraList, pullCamera} from './integration.api';
import { useUserStore } from '/@/store/modules/user';
import CameraPreviewModal from '/@/views/iot/tplink/camera/components/CameraPreviewModal.vue'
const previewModal = ref();
@@ -115,6 +115,17 @@ function handlePreview(record: Recordable) {
previewModal.value.edit(record);
}
+/**
+ * 拉取设备
+ */
+async function handlePull(record: Recordable) {
+ await pullCamera(record).then((res) => {
+ setTimeout(() => {
+ reload();
+ }, 4000);
+ })
+}
+
/**
* 操作栏
*/
@@ -122,7 +133,7 @@ function getTableAction(record) {
return [
{
label: '拉取设备',
- onClick: handlePreview.bind(null, record),
+ onClick: handlePull.bind(null, record),
ifShow: record.sn != null && record.deviceStatus =='待集成'
},
{
diff --git a/src/views/device/manager/components/integration/ElectricityList.vue b/src/views/device/manager/components/integration/ElectricityList.vue
index e814ed0..1571aed 100644
--- a/src/views/device/manager/components/integration/ElectricityList.vue
+++ b/src/views/device/manager/components/integration/ElectricityList.vue
@@ -32,8 +32,9 @@ import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { deviceColumns } from './integration.data';
-import { electricityList } from './integration.api';
+import { electricityList,pullElectricity } from './integration.api';
import { useUserStore } from '/@/store/modules/user';
+import {sendBatch} from "@/views/device/manager/components/batch/batch.api";
const previewModal = ref();
const formRef = ref();
const queryParam = reactive({});
@@ -100,6 +101,17 @@ function searchReset() {
reload();
}
+/**
+ * 拉取设备
+ */
+async function handlePull(record: Recordable) {
+ await pullElectricity(record).then((res) => {
+ setTimeout(() => {
+ reload();
+ }, 4000);
+ })
+}
+
/**
* 操作栏
*/
@@ -107,7 +119,7 @@ function getTableAction(record) {
return [
{
label: '拉取设备',
- // onClick: handlePreview.bind(null, record),
+ onClick: handlePull.bind(null, record),
ifShow: record.sn != null && record.deviceStatus =='待集成'
},
];
diff --git a/src/views/device/manager/components/integration/HumidList.vue b/src/views/device/manager/components/integration/HumidList.vue
index 55801c5..b29ebff 100644
--- a/src/views/device/manager/components/integration/HumidList.vue
+++ b/src/views/device/manager/components/integration/HumidList.vue
@@ -32,7 +32,7 @@ import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { deviceColumns } from './integration.data';
-import { humidList } from './integration.api';
+import {humidList, pullHumid} from './integration.api';
import { useUserStore } from '/@/store/modules/user';
const previewModal = ref();
const formRef = ref();
@@ -113,6 +113,17 @@ function handleConfig(record: Recordable) {
previewModal.value.edit(record);
}
+/**
+ * 拉取设备
+ */
+async function handlePull(record: Recordable) {
+ await pullHumid(record).then((res) => {
+ setTimeout(() => {
+ reload();
+ }, 4000);
+ })
+}
+
/**
* 操作栏
*/
@@ -120,7 +131,7 @@ function getTableAction(record) {
return [
{
label: '拉取设备',
- // onClick: handlePreview.bind(null, record),
+ onClick: handlePull.bind(null, record),
ifShow: record.sn != null && record.deviceStatus =='待集成'
},
{
diff --git a/src/views/device/manager/components/integration/NetworkList.vue b/src/views/device/manager/components/integration/NetworkList.vue
index 7e0d660..04ba160 100644
--- a/src/views/device/manager/components/integration/NetworkList.vue
+++ b/src/views/device/manager/components/integration/NetworkList.vue
@@ -32,7 +32,7 @@ import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { deviceColumns } from './integration.data';
-import { networkList } from './integration.api';
+import {networkList, pullNetwork} from './integration.api';
import { useUserStore } from '/@/store/modules/user';
const previewModal = ref();
const formRef = ref();
@@ -100,6 +100,17 @@ function searchReset() {
reload();
}
+/**
+ * 拉取设备
+ */
+async function handlePull(record: Recordable) {
+ await pullNetwork(record).then((res) => {
+ setTimeout(() => {
+ reload();
+ }, 4000);
+ })
+}
+
/**
* 操作栏
*/
@@ -107,7 +118,7 @@ function getTableAction(record) {
return [
{
label: '拉取设备',
- // onClick: handlePreview.bind(null, record),
+ onClick: handlePull.bind(null, record),
ifShow: record.sn != null && record.deviceStatus =='待集成'
},
];
diff --git a/src/views/device/manager/components/integration/WaterList.vue b/src/views/device/manager/components/integration/WaterList.vue
index 73c8aa8..37330fd 100644
--- a/src/views/device/manager/components/integration/WaterList.vue
+++ b/src/views/device/manager/components/integration/WaterList.vue
@@ -32,7 +32,7 @@ import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { deviceColumns } from './integration.data';
-import { waterList } from './integration.api';
+import {pullWater, waterList} from './integration.api';
import { useUserStore } from '/@/store/modules/user';
const previewModal = ref();
const formRef = ref();
@@ -100,6 +100,17 @@ function searchReset() {
reload();
}
+/**
+ * 拉取设备
+ */
+async function handlePull(record: Recordable) {
+ await pullWater(record).then((res) => {
+ setTimeout(() => {
+ reload();
+ }, 4000);
+ })
+}
+
/**
* 操作栏
*/
@@ -107,7 +118,7 @@ function getTableAction(record) {
return [
{
label: '拉取设备',
- // onClick: handlePreview.bind(null, record),
+ onClick: handlePull.bind(null, record),
ifShow: record.sn != null && record.deviceStatus =='待集成'
},
];
diff --git a/src/views/device/manager/components/integration/integration.api.ts b/src/views/device/manager/components/integration/integration.api.ts
index e957796..c6c0fcc 100644
--- a/src/views/device/manager/components/integration/integration.api.ts
+++ b/src/views/device/manager/components/integration/integration.api.ts
@@ -6,6 +6,13 @@ enum Api {
electricityList = '/iot/device/manager/electricityList',
waterList = '/iot/device/manager/waterList',
humidList = '/iot/device/manager/humidList',
+
+ pullCamera = '/iot/device/manager/pullCamera',
+ pullNetwork = '/iot/device/manager/pullNetwork',
+ pullElectricity = '/iot/device/manager/pullElectricity',
+ pullWater = '/iot/device/manager/pullWater',
+ pullHumid = '/iot/device/manager/pullHumid',
+
}
/**
@@ -18,4 +25,8 @@ export const electricityList = (params) => defHttp.get({ url: Api.electricityLis
export const waterList = (params) => defHttp.get({ url: Api.waterList, params });
export const humidList = (params) => defHttp.get({ url: Api.humidList, params });
-
+export const pullCamera = (params) => defHttp.post({ url: Api.pullCamera, params });
+export const pullNetwork = (params) => defHttp.post({ url: Api.pullNetwork, params });
+export const pullElectricity = (params) => defHttp.post({ url: Api.pullElectricity, params });
+export const pullWater = (params) => defHttp.post({ url: Api.pullWater, params });
+export const pullHumid = (params) => defHttp.post({ url: Api.pullHumid, params });
diff --git a/src/views/device/manager/components/integration/integration.data.ts b/src/views/device/manager/components/integration/integration.data.ts
index 3d5d195..07c43c7 100644
--- a/src/views/device/manager/components/integration/integration.data.ts
+++ b/src/views/device/manager/components/integration/integration.data.ts
@@ -15,6 +15,12 @@ export const deviceColumns: BasicColumn[] = [
dataIndex: 'sn',
width: 150
},
+ {
+ title: '设备名称',
+ align: "center",
+ dataIndex: 'deviceName',
+ width: 150
+ },
{
title: '设备类型',
align: "center",