From b751f4aed7bc0c3b8f6f0a7583473272d014e0d3 Mon Sep 17 00:00:00 2001
From: yangjun <1173114630@qq.com>
Date: Thu, 19 Jun 2025 14:30:59 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B0=B4=E8=A1=A8=EF=BC=8C?=
=?UTF-8?q?=E6=B8=A9=E6=B9=BF=E5=BA=A6=E7=A1=AC=E4=BB=B6=E9=85=8D=E7=BD=AE?=
=?UTF-8?q?=E5=8F=8A=E5=90=8C=E6=AD=A5=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../tq/electricity/apilog/WaterApiLogList.vue | 92 ++++++++++
.../electricity/apilog/WaterApiLogModal.vue | 66 +++++++
src/views/iot/tq/electricity/index.vue | 26 +--
.../NuIotTqApiRequestLog.data.ts | 2 +-
.../HumidDeviceSyncLogList.vue | 169 ++++++++++++++++++
.../HumidDeviceSyncLogListModal.vue | 66 +++++++
.../NuIotTqElectricitySyncLogList.vue | 2 +-
.../WaterSyncLogList.vue | 169 ++++++++++++++++++
.../WaterSyncLogListModal.vue | 66 +++++++
src/views/iot/tq/water/index.vue | 59 +++++-
src/views/iot/tq/water/water.data.ts | 36 ++--
src/views/iot/yiweilian/humid.data.ts | 41 +++--
src/views/iot/yiweilian/index.vue | 40 ++++-
13 files changed, 770 insertions(+), 64 deletions(-)
create mode 100644 src/views/iot/tq/electricity/apilog/WaterApiLogList.vue
create mode 100644 src/views/iot/tq/electricity/apilog/WaterApiLogModal.vue
create mode 100644 src/views/iot/tq/nuIotTqElectricitySyncLog/HumidDeviceSyncLogList.vue
create mode 100644 src/views/iot/tq/nuIotTqElectricitySyncLog/HumidDeviceSyncLogListModal.vue
create mode 100644 src/views/iot/tq/nuIotTqElectricitySyncLog/WaterSyncLogList.vue
create mode 100644 src/views/iot/tq/nuIotTqElectricitySyncLog/WaterSyncLogListModal.vue
diff --git a/src/views/iot/tq/electricity/apilog/WaterApiLogList.vue b/src/views/iot/tq/electricity/apilog/WaterApiLogList.vue
new file mode 100644
index 0000000..d32a6d6
--- /dev/null
+++ b/src/views/iot/tq/electricity/apilog/WaterApiLogList.vue
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/tq/electricity/apilog/WaterApiLogModal.vue b/src/views/iot/tq/electricity/apilog/WaterApiLogModal.vue
new file mode 100644
index 0000000..3092ae1
--- /dev/null
+++ b/src/views/iot/tq/electricity/apilog/WaterApiLogModal.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/tq/electricity/index.vue b/src/views/iot/tq/electricity/index.vue
index 23f33e8..9d8bd88 100644
--- a/src/views/iot/tq/electricity/index.vue
+++ b/src/views/iot/tq/electricity/index.vue
@@ -45,7 +45,6 @@
-
@@ -62,14 +61,12 @@
import { columns, searchFormSchema } from './electricity.data';
import {useModal} from "@/components/Modal";
- import DepartUtilsList from "@/views/utils/departUtils/DepartUtilsModal.vue";
import HldyUtilsModal from "@/views/utils/nuUtils/HldyUtilsModal.vue";
import ApiLogModal from "@/views/iot/tq/electricity/apilog/ApiLogModal.vue";
import NuIotTqElectricitySyncLogListModal from "/@/views/iot/tq/nuIotTqElectricitySyncLog/NuIotTqElectricitySyncLogListModal.vue";
import { defHttp } from '/@/utils/http/axios';
const queryParam = reactive({});
- const departUtilsModal = ref();
const apiLogModal = ref();
const syncLogModal = ref();
const hldyUtilsModal = ref();
@@ -111,23 +108,11 @@ import { defHttp } from '/@/utils/http/axios';
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
-
- //机构回调
- function handleParams(params){
- console.log("🚀 ~ handleParams ~ params:", params)
- defHttp.post({
- url: "/iot/tq/electricityMeter/edit",
- params:params.value
- }).then(res=>{
- console.log("🚀 ~ getTableAction ~ res:", res)
- })
- }
//护理单元回调
function handleHldyParams(params){
- console.log("🚀 ~ handleParams ~ params:", params)
defHttp.post({
- url: "/iot/tq/electricityMeter/edit",
+ url: "/iot/tq/electricityMeter/editHldy",
params:params
}).then(res=>{
console.log("🚀 ~ getTableAction ~ res:", res)
@@ -176,13 +161,6 @@ import { defHttp } from '/@/utils/http/axios';
]
}
-/**
- * 配置机构信息
- */
- function handlePzjg(record: Recordable){
- departUtilsModal.value.disableSubmit = false;
- departUtilsModal.value.edit(record);
- }
// 抄电表
async function handleRead(record: Recordable) {
@@ -271,10 +249,8 @@ import { defHttp } from '/@/utils/http/axios';
* 配置护理单元
*/
function handlePzhldy(record){
- console.log("🚀 ~ handlePzhldy ~ record:", record)
hldyUtilsModal.value.disableSubmit = true;
hldyUtilsModal.value.edit(record);
-
}
diff --git a/src/views/iot/tq/nuIotTqApiRequestLog/NuIotTqApiRequestLog.data.ts b/src/views/iot/tq/nuIotTqApiRequestLog/NuIotTqApiRequestLog.data.ts
index 98315c4..0d38cac 100644
--- a/src/views/iot/tq/nuIotTqApiRequestLog/NuIotTqApiRequestLog.data.ts
+++ b/src/views/iot/tq/nuIotTqApiRequestLog/NuIotTqApiRequestLog.data.ts
@@ -16,7 +16,7 @@ export const columns: BasicColumn[] = [
dataIndex: 'type_dictText'
},
{
- title: '上次请求时的值',
+ title: '上次请求值',
align: "center",
dataIndex: 'requestValue'
},
diff --git a/src/views/iot/tq/nuIotTqElectricitySyncLog/HumidDeviceSyncLogList.vue b/src/views/iot/tq/nuIotTqElectricitySyncLog/HumidDeviceSyncLogList.vue
new file mode 100644
index 0000000..3479b09
--- /dev/null
+++ b/src/views/iot/tq/nuIotTqElectricitySyncLog/HumidDeviceSyncLogList.vue
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+ 同步
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/tq/nuIotTqElectricitySyncLog/HumidDeviceSyncLogListModal.vue b/src/views/iot/tq/nuIotTqElectricitySyncLog/HumidDeviceSyncLogListModal.vue
new file mode 100644
index 0000000..5b73fe4
--- /dev/null
+++ b/src/views/iot/tq/nuIotTqElectricitySyncLog/HumidDeviceSyncLogListModal.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/tq/nuIotTqElectricitySyncLog/NuIotTqElectricitySyncLogList.vue b/src/views/iot/tq/nuIotTqElectricitySyncLog/NuIotTqElectricitySyncLogList.vue
index 93b8612..eca39bf 100644
--- a/src/views/iot/tq/nuIotTqElectricitySyncLog/NuIotTqElectricitySyncLogList.vue
+++ b/src/views/iot/tq/nuIotTqElectricitySyncLog/NuIotTqElectricitySyncLogList.vue
@@ -133,7 +133,7 @@ import { defHttp } from '/@/utils/http/axios';
function init(record){
console.log("🚀 ~ init ~ record:", record)
syncInfo.value = record;
- queryParam.mainId = record.id;
+ queryParam.mainId = record.cid;
reload();
}
diff --git a/src/views/iot/tq/nuIotTqElectricitySyncLog/WaterSyncLogList.vue b/src/views/iot/tq/nuIotTqElectricitySyncLog/WaterSyncLogList.vue
new file mode 100644
index 0000000..cd5b1f1
--- /dev/null
+++ b/src/views/iot/tq/nuIotTqElectricitySyncLog/WaterSyncLogList.vue
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+ 同步
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/tq/nuIotTqElectricitySyncLog/WaterSyncLogListModal.vue b/src/views/iot/tq/nuIotTqElectricitySyncLog/WaterSyncLogListModal.vue
new file mode 100644
index 0000000..1980a7d
--- /dev/null
+++ b/src/views/iot/tq/nuIotTqElectricitySyncLog/WaterSyncLogListModal.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/tq/water/index.vue b/src/views/iot/tq/water/index.vue
index fbcce82..e03dc3e 100644
--- a/src/views/iot/tq/water/index.vue
+++ b/src/views/iot/tq/water/index.vue
@@ -4,12 +4,16 @@
- 同步设备
- 同步采集器
+ 拉取设备
+ 更新在线状态
-
+
+
+ 未配置
+ {{record.nuName}}
@@ -52,6 +56,9 @@
+
+
+
@@ -64,8 +71,15 @@
import {list, waterReset, waterControl, waterRead, getAllMeter, getAllCollector} from './water.api';
import { columns, searchFormSchema } from './water.data';
import {useModal} from "@/components/Modal";
+ import { defHttp } from '/@/utils/http/axios';
+ import HldyUtilsModal from "@/views/utils/nuUtils/HldyUtilsModal.vue";
+ import ApiLogModal from "@/views/iot/tq/electricity/apilog/WaterApiLogModal.vue";
+ import SyncLogListModal from "/@/views/iot/tq/nuIotTqElectricitySyncLog/WaterSyncLogListModal.vue";
const queryParam = reactive({});
+ const apiLogModal = ref();
+ const syncLogModal = ref();
+ const hldyUtilsModal = ref();
//注册model
const [registerModal, {openModal}] = useModal();
//注册table数据
@@ -87,7 +101,7 @@
],
},
actionColumn: {
- width: 200,
+ width: 290,
fixed:'right'
},
beforeFetch: (params) => {
@@ -129,7 +143,15 @@
confirm: handleReset.bind(null, record),
placement: 'topLeft',
},
- }
+ },
+ {
+ label: '日志',
+ onClick: showApiLog.bind(null, record),
+ },
+ {
+ label: '同步',
+ onClick: handleSync.bind(null, record),
+ },
]
}
@@ -208,8 +230,35 @@
reload();
}
+ /**
+ * 查看api日志
+ */
function showApiLog(record){
console.log(record);
+ apiLogModal.value.disableSubmit = true;
+ apiLogModal.value.showApiLog(record);
+ }
+ /**
+ * 配置护理单元
+ */
+ function handlePzhldy(record){
+ hldyUtilsModal.value.disableSubmit = true;
+ hldyUtilsModal.value.edit(record);
+ }
+
+ //护理单元回调
+ function handleHldyParams(params){
+ defHttp.post({
+ url: "/iot/tq/waterMeter/editHldy",
+ params:params
+ }).then(res=>{
+ reload();
+ })
+ }
+ //同步
+ function handleSync(record: Recordable){
+ syncLogModal.value.disableSubmit = true;
+ syncLogModal.value.init(record);
}
diff --git a/src/views/iot/tq/water/water.data.ts b/src/views/iot/tq/water/water.data.ts
index a87d91c..24bbff9 100644
--- a/src/views/iot/tq/water/water.data.ts
+++ b/src/views/iot/tq/water/water.data.ts
@@ -4,12 +4,12 @@ import {FormSchema} from '/@/components/Table';
//列表数据
export const columns: BasicColumn[] = [
{
- title: '机构',
+ title: '单元编码',
align: "center",
- dataIndex: 'departName'
+ dataIndex: 'nuId'
},
{
- title: '护理单元',
+ title: '单元名称',
align: "center",
dataIndex: 'nuName'
},
@@ -19,10 +19,16 @@ export const columns: BasicColumn[] = [
dataIndex: 'address'
},
{
- title: '采集器号',
+ title: '机构名称',
align: "center",
- dataIndex: 'cid'
+ dataIndex: 'departName',
+ width: 220,
},
+ // {
+ // title: '采集器号',
+ // align: "center",
+ // dataIndex: 'cid'
+ // },
{
title: '设备状态',
align: "center",
@@ -80,16 +86,16 @@ export const columns: BasicColumn[] = [
align: "center",
dataIndex: 'connectTime'
},
- {
- title: '上次掉线时间',
- align: "center",
- dataIndex: 'disconnectTime'
- },
- {
- title: '描述',
- align: "center",
- dataIndex: 'remark'
- },
+ // {
+ // title: '上次掉线时间',
+ // align: "center",
+ // dataIndex: 'disconnectTime'
+ // },
+ // {
+ // title: '描述',
+ // align: "center",
+ // dataIndex: 'remark'
+ // },
];
export const searchFormSchema: FormSchema[] = [
diff --git a/src/views/iot/yiweilian/humid.data.ts b/src/views/iot/yiweilian/humid.data.ts
index fefb98c..93f3fbb 100644
--- a/src/views/iot/yiweilian/humid.data.ts
+++ b/src/views/iot/yiweilian/humid.data.ts
@@ -4,12 +4,12 @@ import {FormSchema} from '/@/components/Table';
//列表数据
export const columns: BasicColumn[] = [
{
- title: '机构',
+ title: '单元编码',
align: "center",
- dataIndex: 'departName'
+ dataIndex: 'nuId'
},
{
- title: '护理单元',
+ title: '单元名称',
align: "center",
dataIndex: 'nuName'
},
@@ -24,19 +24,9 @@ export const columns: BasicColumn[] = [
dataIndex: 'deviceName'
},
{
- title: '告警数',
+ title: '机构',
align: "center",
- dataIndex: 'alarmCn'
- },
- {
- title: '记录间隔',
- align: "center",
- dataIndex: 'recordInterval'
- },
- {
- title: '上报间隔',
- align: "center",
- dataIndex: 'reportingInterval'
+ dataIndex: 'departName'
},
{
title: '温度',
@@ -53,10 +43,29 @@ export const columns: BasicColumn[] = [
align: "center",
dataIndex: 'reportingTime'
},
+ {
+ title: '告警数',
+ align: "center",
+ dataIndex: 'alarmCn',
+ defaultHidden: true,
+ },
+ {
+ title: '记录间隔',
+ align: "center",
+ dataIndex: 'recordInterval',
+ defaultHidden: true,
+ },
+ {
+ title: '上报间隔',
+ align: "center",
+ dataIndex: 'reportingInterval',
+ defaultHidden: true,
+ },
{
title: '电量',
align: "center",
- dataIndex: 'electricity'
+ dataIndex: 'electricity',
+ defaultHidden: true,
},
{
title: '在线状态',
diff --git a/src/views/iot/yiweilian/index.vue b/src/views/iot/yiweilian/index.vue
index a48a204..973eea4 100644
--- a/src/views/iot/yiweilian/index.vue
+++ b/src/views/iot/yiweilian/index.vue
@@ -7,6 +7,10 @@
添加设备
+
+ 未配置
+ {{record.nuName}}
+
在线
@@ -23,6 +27,8 @@
+
+
@@ -37,7 +43,12 @@
import {useModal} from "@/components/Modal";
import {useDrawer} from "@/components/Drawer";
import ApiLogAlarmModal from './components/ApiLogAlarmModal.vue'
+ import HldyUtilsModal from "@/views/utils/nuUtils/HldyUtilsModal.vue";
+ import HumidDeviceSyncLogListModal from "/@/views/iot/tq/nuIotTqElectricitySyncLog/HumidDeviceSyncLogListModal.vue";
+ import { defHttp } from '/@/utils/http/axios';
const apiLogAlarmModal = ref();
+ const hldyUtilsModal = ref();
+ const syncLogModal = ref();
//注册drawer
const [registerDrawer, { openDrawer }] = useDrawer();
const queryParam = reactive({});
@@ -62,7 +73,7 @@
],
},
actionColumn: {
- width: 200,
+ width: 290,
fixed:'right'
},
beforeFetch: (params) => {
@@ -105,6 +116,10 @@
label: '日志',
onClick: handleApiLogAlarm.bind(null, record),
},
+ {
+ label: '同步',
+ onClick: handleSync.bind(null, record),
+ },
]
}
@@ -153,4 +168,27 @@
apiLogAlarmModal.value.showLogAlarm(record);
}
+
+ //护理单元回调
+ function handleHldyParams(params){
+ defHttp.post({
+ url: "/iot/yiweilian/humidDevice/editHldy",
+ params:params
+ }).then(res=>{
+ console.log("🚀 ~ getTableAction ~ res:", res)
+ reload();
+ })
+ }
+ /**
+ * 配置护理单元
+ */
+ function handlePzhldy(record){
+ hldyUtilsModal.value.disableSubmit = true;
+ hldyUtilsModal.value.edit(record);
+ }
+ //同步
+ function handleSync(record: Recordable){
+ syncLogModal.value.disableSubmit = true;
+ syncLogModal.value.init(record);
+ }