From fa0d05a03d7aa715201535e717d69b1a09c48c63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B9=E7=A3=8A?= <45566618@qq.com>
Date: Wed, 18 Jun 2025 15:39:43 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E6=B8=A9=E6=B9=BF=E5=BA=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../iot/yiweilian/components/AlarmList.vue | 114 ++++
.../yiweilian/components/ApiLogAlarmList.vue | 56 ++
.../yiweilian/components/ApiLogAlarmModal.vue | 66 +++
.../iot/yiweilian/components/ApiLogList.vue | 114 ++++
.../yiweilian/components/DeviceInfoDrawer.vue | 119 ++++
src/views/iot/yiweilian/humid.api.ts | 60 ++
src/views/iot/yiweilian/humid.data.ts | 529 ++++++++++++++++++
src/views/iot/yiweilian/index.vue | 156 ++++++
8 files changed, 1214 insertions(+)
create mode 100644 src/views/iot/yiweilian/components/AlarmList.vue
create mode 100644 src/views/iot/yiweilian/components/ApiLogAlarmList.vue
create mode 100644 src/views/iot/yiweilian/components/ApiLogAlarmModal.vue
create mode 100644 src/views/iot/yiweilian/components/ApiLogList.vue
create mode 100644 src/views/iot/yiweilian/components/DeviceInfoDrawer.vue
create mode 100644 src/views/iot/yiweilian/humid.api.ts
create mode 100644 src/views/iot/yiweilian/humid.data.ts
create mode 100644 src/views/iot/yiweilian/index.vue
diff --git a/src/views/iot/yiweilian/components/AlarmList.vue b/src/views/iot/yiweilian/components/AlarmList.vue
new file mode 100644
index 0000000..6e574ab
--- /dev/null
+++ b/src/views/iot/yiweilian/components/AlarmList.vue
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/yiweilian/components/ApiLogAlarmList.vue b/src/views/iot/yiweilian/components/ApiLogAlarmList.vue
new file mode 100644
index 0000000..e029dc8
--- /dev/null
+++ b/src/views/iot/yiweilian/components/ApiLogAlarmList.vue
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/yiweilian/components/ApiLogAlarmModal.vue b/src/views/iot/yiweilian/components/ApiLogAlarmModal.vue
new file mode 100644
index 0000000..e852e51
--- /dev/null
+++ b/src/views/iot/yiweilian/components/ApiLogAlarmModal.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/yiweilian/components/ApiLogList.vue b/src/views/iot/yiweilian/components/ApiLogList.vue
new file mode 100644
index 0000000..38c2e3c
--- /dev/null
+++ b/src/views/iot/yiweilian/components/ApiLogList.vue
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/yiweilian/components/DeviceInfoDrawer.vue b/src/views/iot/yiweilian/components/DeviceInfoDrawer.vue
new file mode 100644
index 0000000..0c9e202
--- /dev/null
+++ b/src/views/iot/yiweilian/components/DeviceInfoDrawer.vue
@@ -0,0 +1,119 @@
+
+
+
+
+ 读取
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/yiweilian/humid.api.ts b/src/views/iot/yiweilian/humid.api.ts
new file mode 100644
index 0000000..dfc1aa8
--- /dev/null
+++ b/src/views/iot/yiweilian/humid.api.ts
@@ -0,0 +1,60 @@
+import { defHttp } from '/@/utils/http/axios';
+
+enum Api {
+ list = '/iot/yiweilian/humidDevice/list',
+ insertDevice = '/iot/yiweilian/humidDevice/insertDevice',
+ updateDevice = '/iot/yiweilian/humidDevice/updateDevice',
+ deleteDevice = '/iot/yiweilian/humidDevice/deleteDevice',
+ getDeviceParameters = '/iot/yiweilian/humidDevice/getDeviceParameters',
+ updateDeviceRealTime = '/iot/yiweilian/humidDevice/updateDeviceRealTime',
+ logList = '/iot/yiweilian/humidDevice/logList',
+ alarmList = '/iot/yiweilian/humidAlarm/list',
+}
+
+/**
+ * 列表接口
+ * @param params
+ */
+export const list = (params) => defHttp.get({ url: Api.list, params });
+
+/**
+ * 添加
+ * @param params
+ */
+export const insertDevice = (params?) => defHttp.get({ url: Api.insertDevice, params });
+
+/**
+ * 更新
+ * @param params
+ */
+export const updateDevice = (params?) => defHttp.get({ url: Api.updateDevice, params });
+
+/**
+ * 删除
+ * @param params
+ */
+export const deleteDevice = (params?) => defHttp.get({ url: Api.deleteDevice, params });
+
+/**
+ * 获取设备配置参数
+ * @param params
+ */
+export const getDeviceParameters = (params?) => defHttp.get({ url: Api.getDeviceParameters, params });
+
+/**
+ * 抄表
+ * @param params
+ */
+export const updateDeviceRealTime = (params?) => defHttp.get({ url: Api.updateDeviceRealTime, params });
+
+/**
+ * 操作日志
+ * @param params
+ */
+export const logList = (params?) => defHttp.get({ url: Api.logList, params });
+
+/**
+ * 告警日志
+ * @param params
+ */
+export const alarmList = (params?) => defHttp.get({ url: Api.alarmList, params });
diff --git a/src/views/iot/yiweilian/humid.data.ts b/src/views/iot/yiweilian/humid.data.ts
new file mode 100644
index 0000000..fefb98c
--- /dev/null
+++ b/src/views/iot/yiweilian/humid.data.ts
@@ -0,0 +1,529 @@
+import {BasicColumn} from '/@/components/Table';
+import {FormSchema} from '/@/components/Table';
+
+//列表数据
+export const columns: BasicColumn[] = [
+ {
+ title: '机构',
+ align: "center",
+ dataIndex: 'departName'
+ },
+ {
+ title: '护理单元',
+ align: "center",
+ dataIndex: 'nuName'
+ },
+ {
+ title: '设备序号',
+ align: "center",
+ dataIndex: 'sn'
+ },
+ {
+ title: '设备名称',
+ align: "center",
+ dataIndex: 'deviceName'
+ },
+ {
+ title: '告警数',
+ align: "center",
+ dataIndex: 'alarmCn'
+ },
+ {
+ title: '记录间隔',
+ align: "center",
+ dataIndex: 'recordInterval'
+ },
+ {
+ title: '上报间隔',
+ align: "center",
+ dataIndex: 'reportingInterval'
+ },
+ {
+ title: '温度',
+ align: "center",
+ dataIndex: 'temperature'
+ },
+ {
+ title: '湿度',
+ align: "center",
+ dataIndex: 'humidity'
+ },
+ {
+ title: '最新上报时间',
+ align: "center",
+ dataIndex: 'reportingTime'
+ },
+ {
+ title: '电量',
+ align: "center",
+ dataIndex: 'electricity'
+ },
+ {
+ title: '在线状态',
+ align: "center",
+ dataIndex: 'status',
+ customRender:({record})=>{
+ return record.status?(record.status=='0'?'在线':'离线'):'';
+ },
+ },
+];
+
+export const searchFormSchema: FormSchema[] = [
+ {
+ label: '机构',
+ field: 'deviceStatus',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择机构',
+ dictCode: 'sys_depart,depart_name,id,org_category = 1 order by depart_name asc',
+ },
+ colProps: { span: 6 },
+ },
+ {
+ label: '护理单元',
+ field: 'deviceStatus',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择护理单元',
+ dictCode: 'nu_base_info,nu_name,id,del_flag = 0 order by nu_name asc',
+ },
+ colProps: { span: 6 },
+ },
+ {
+ label: '设备序号',
+ field: 'sn',
+ component: 'Input',
+ colProps: { span: 6 },
+ },
+ {
+ label: '在线状态',
+ field: 'status',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择状态',
+ options: [
+ { label: '在线', value: '0' },
+ { label: '离线', value: '1' },
+ ],
+ },
+ colProps: { span: 6 },
+ },
+];
+
+export const formSchema: FormSchema[] = [
+ {
+ label: '',
+ field: 'isUpdate',
+ component: 'Input',
+ ifShow: false,
+ },
+ {
+ label: '设备序号',
+ field: 'sn',
+ component: 'Input',
+ dynamicDisabled: ({ values }) => {
+ return values.isUpdate;
+ },
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '设备名称',
+ field: 'deviceName',
+ component: 'Input',
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '时区',
+ field: 'timeCode',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择时区',
+ options: [
+ { label: '北京时间', value: '01' },
+/* { label: '纽约时间', value: '02' },*/
+ ],
+ },
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '设备类型',
+ field: 'deviceTypes',
+ component: 'Input',
+ show: false,
+ },
+ {
+ label: '记录间隔(分钟)',
+ field: 'recordInterval',
+ component: 'InputNumber',
+ ifShow: ({ values }) => {
+ //有值就是显示
+ return values.isUpdate;
+ },
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '上报间隔(分钟)',
+ field: 'reportingInterval',
+ component: 'InputNumber',
+ ifShow: ({ values }) => {
+ //有值就是显示
+ return values.isUpdate;
+ },
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '历史上报时刻(00:00)',
+ field: 'historyReportTime',
+ component: 'Input',
+ componentProps: {
+ size:'default',
+ showNow: true,
+ },
+ ifShow: ({ values }) => {
+ //有值就是显示
+ return values.isUpdate;
+ },
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '历史上报间隔(小时)',
+ field: 'historyInterval',
+ component: 'InputNumber',
+ ifShow: ({ values }) => {
+ //有值就是显示
+ return values.isUpdate;
+ },
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '温度预警-上限',
+ field: 'temperatureHigh',
+ component: 'InputNumber',
+ ifShow: ({ values }) => {
+ //有值就是显示
+ return values.isUpdate;
+ },
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '温度预警-下限',
+ field: 'temperatureLow',
+ component: 'InputNumber',
+ ifShow: ({ values }) => {
+ //有值就是显示
+ return values.isUpdate;
+ },
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '温度缓冲值',
+ field: 'temperatureBuffer',
+ component: 'InputNumber',
+ ifShow: ({ values }) => {
+ //有值就是显示
+ return values.isUpdate;
+ },
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '湿度预警-上限',
+ field: 'humidityHigh',
+ component: 'InputNumber',
+ ifShow: ({ values }) => {
+ //有值就是显示
+ return values.isUpdate;
+ },
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '湿度预警-下限',
+ field: 'humidityLow',
+ component: 'InputNumber',
+ ifShow: ({ values }) => {
+ //有值就是显示
+ return values.isUpdate;
+ },
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '湿度缓冲值',
+ field: 'humidityBuffer',
+ component: 'InputNumber',
+ ifShow: ({ values }) => {
+ //有值就是显示
+ return values.isUpdate;
+ },
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '断电报警开关',
+ field: 'izOutages',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择开关',
+ options: [
+ { label: '开启', value: '0' },
+ { label: '关闭', value: '1' },
+ ],
+ },
+ ifShow: ({ values }) => {
+ //有值就是显示
+ return values.isUpdate;
+ },
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '低电报警开关',
+ field: 'izLowBattery',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择开关',
+ options: [
+ { label: '开启', value: '0' },
+ { label: '关闭', value: '1' },
+ ],
+ },
+ ifShow: ({ values }) => {
+ //有值就是显示
+ return values.isUpdate;
+ },
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '上下线通知开关',
+ field: 'izOnline',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择开关',
+ options: [
+ { label: '开启', value: '0' },
+ { label: '关闭', value: '1' },
+ ],
+ },
+ ifShow: ({ values }) => {
+ //有值就是显示
+ return values.isUpdate;
+ },
+ required: true,
+ labelWidth: '160px'
+ },
+ {
+ label: '读取参数',
+ field: 'id',
+ component: 'Input',
+ slot: 'customInput',
+ ifShow: ({ values }) => {
+ //有值就是显示
+ return values.isUpdate;
+ },
+ labelWidth: '160px'
+ }
+];
+
+//列表数据
+export const logColumns: BasicColumn[] = [
+ {
+ title: '设备序号',
+ align: "center",
+ dataIndex: 'sn'
+ },
+ {
+ title: '操作时间',
+ align: "center",
+ dataIndex: 'optTime'
+ },
+ {
+ title: '操作人',
+ align: "center",
+ dataIndex: 'optBy'
+ },
+ {
+ title: '操作类型',
+ align: "center",
+ dataIndex: 'optType',
+ customRender:({record})=>{
+ if(record.optType == 'insert'){
+ return '新增';
+ }else if(record.optType == 'update'){
+ return '修改';
+ }else if(record.optType == 'delete'){
+ return '删除';
+ }else{
+ return '';
+ }
+ },
+ },
+ {
+ title: '记录间隔',
+ align: "center",
+ dataIndex: 'recordInterval'
+ },
+ {
+ title: '上报间隔',
+ align: "center",
+ dataIndex: 'reportingInterval'
+ },
+ {
+ title: '历史数据上报时刻',
+ align: "center",
+ dataIndex: 'historyReportTime'
+ },
+ {
+ title: '历史数据上报间隔',
+ align: "center",
+ dataIndex: 'historyInterval'
+ },
+ {
+ title: '温度预警-上限',
+ align: "center",
+ dataIndex: 'temperatureHigh'
+ },
+ {
+ title: '温度预警-下限',
+ align: "center",
+ dataIndex: 'temperatureLow'
+ },
+ {
+ title: '温度缓冲值',
+ align: "center",
+ dataIndex: 'temperatureBuffer'
+ },
+ {
+ title: '湿度预警-上限',
+ align: "center",
+ dataIndex: 'humidityHigh'
+ },
+ {
+ title: '湿度预警-下限',
+ align: "center",
+ dataIndex: 'humidityLow'
+ },
+ {
+ title: '湿度缓冲值',
+ align: "center",
+ dataIndex: 'humidityBuffer'
+ },
+ {
+ title: '断电报警',
+ align: "center",
+ dataIndex: 'izOutages',
+ customRender:({record})=>{
+ return record.izOutages?(record.izOutages=='0'?'开启':'关闭'):'';
+ },
+ },
+ {
+ title: '低电报警',
+ align: "center",
+ dataIndex: 'izLowBattery',
+ customRender:({record})=>{
+ return record.izLowBattery?(record.izLowBattery=='0'?'开启':'关闭'):'';
+ },
+ },
+ {
+ title: '上下线通知',
+ align: "center",
+ dataIndex: 'izOnline',
+ customRender:({record})=>{
+ return record.izOnline?(record.izOnline=='0'?'开启':'关闭'):'';
+ },
+ },
+];
+
+export const logQuerySchema: FormSchema[] = [
+ {
+ label: '操作类型',
+ field: 'optType',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择操作类型',
+ options: [
+ { label: '新增', value: 'insert' },
+ { label: '修改', value: 'update' },
+ { label: '删除', value: 'delete' },
+ ],
+ },
+ colProps: { span: 6 },
+ },
+];
+
+//列表数据
+export const alarmColumns: BasicColumn[] = [
+ {
+ title: '设备序号',
+ align: "center",
+ dataIndex: 'sn'
+ },
+ {
+ title: '状态',
+ align: "center",
+ dataIndex: 'status',
+ customRender:({record})=>{
+ if(record.optType == '0'){
+ return '告警';
+ }else {
+ return '清除';
+ }
+ },
+ },
+ {
+ title: '告警时间',
+ align: "center",
+ dataIndex: 'wrDate'
+ },
+ {
+ title: '告警内容',
+ align: "center",
+ dataIndex: 'wrContent'
+ },
+ {
+ title: '告警值',
+ align: "center",
+ dataIndex: 'wrData'
+ },
+ {
+ title: '清除时间',
+ align: "center",
+ dataIndex: 'clearDate'
+ },
+ {
+ title: '清除内容',
+ align: "center",
+ dataIndex: 'clearContent'
+ },
+ {
+ title: '清除值',
+ align: "center",
+ dataIndex: 'clearData'
+ },
+];
+
+export const alarmQuerySchema: FormSchema[] = [
+ {
+ label: '告警状态',
+ field: 'status',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择告警状态',
+ options: [
+ { label: '告警', value: '0' },
+ { label: '清除', value: '1' },
+ ],
+ },
+ colProps: { span: 6 },
+ },
+];
diff --git a/src/views/iot/yiweilian/index.vue b/src/views/iot/yiweilian/index.vue
new file mode 100644
index 0000000..a48a204
--- /dev/null
+++ b/src/views/iot/yiweilian/index.vue
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+ 添加设备
+
+
+
+
+ 在线
+
+
+ 离线
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From ded861027a5eb38560c9cab1b4f26d3864484b21 Mon Sep 17 00:00:00 2001
From: yangjun <1173114630@qq.com>
Date: Thu, 19 Jun 2025 09:40:52 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E6=99=BA=E8=83=BD=E7=94=B5=E8=A1=A8?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../iot/tq/electricity/apilog/ApiLogList.vue | 12 +--
.../iot/tq/electricity/electricity.data.ts | 36 +++++----
src/views/iot/tq/electricity/index.vue | 20 +++--
.../NuIotTqApiRequestLog.data.ts | 76 +++++++++++++-----
.../utils/departUtils/DepartUtils.data.ts | 12 ++-
.../utils/departUtils/DepartUtilsList.vue | 5 +-
src/views/utils/nuUtils/HldyUtils.data.ts | 10 ++-
src/views/utils/nuUtils/HldyUtilsIndex.vue | 80 +++++++++++++++++++
src/views/utils/nuUtils/HldyUtilsList.vue | 5 +-
src/views/utils/nuUtils/HldyUtilsModal.vue | 6 +-
10 files changed, 195 insertions(+), 67 deletions(-)
create mode 100644 src/views/utils/nuUtils/HldyUtilsIndex.vue
diff --git a/src/views/iot/tq/electricity/apilog/ApiLogList.vue b/src/views/iot/tq/electricity/apilog/ApiLogList.vue
index c000e8e..42e8ee6 100644
--- a/src/views/iot/tq/electricity/apilog/ApiLogList.vue
+++ b/src/views/iot/tq/electricity/apilog/ApiLogList.vue
@@ -1,12 +1,12 @@
-
-
-
-
+
+
+
+
@@ -22,14 +22,14 @@
import NuIotTqApiRequestLogList from '/@/views/iot/tq/nuIotTqApiRequestLog/NuIotTqApiRequestLogList.vue';
-const activeKey= ref('9');
+const activeKey= ref('3');
const dbsbInfo = ref({});
const nuIotTqApiRequestLogListModal9 = ref();
const nuIotTqApiRequestLogListModal3 = ref();
const nuIotTqApiRequestLogListModal10 = ref();
const nuIotTqApiRequestLogListModal11 = ref();
function initLog(record){
- activeKey.value = "9";
+ activeKey.value = "3";
getDataList(activeKey.value, record);
dbsbInfo.value = record;
}
diff --git a/src/views/iot/tq/electricity/electricity.data.ts b/src/views/iot/tq/electricity/electricity.data.ts
index 82bda7a..cab0bc5 100644
--- a/src/views/iot/tq/electricity/electricity.data.ts
+++ b/src/views/iot/tq/electricity/electricity.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",
@@ -72,16 +78,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/tq/electricity/index.vue b/src/views/iot/tq/electricity/index.vue
index e406f65..23f33e8 100644
--- a/src/views/iot/tq/electricity/index.vue
+++ b/src/views/iot/tq/electricity/index.vue
@@ -4,17 +4,10 @@
- 同步设备
- 同步采集器
+ 拉取设备
+ 更新在线状态
-
- {{record.address}}
-
-
- 未配置
- {{record.departName}}
-
未配置
{{record.nuName}}
@@ -101,7 +94,7 @@ import { defHttp } from '/@/utils/http/axios';
],
},
actionColumn: {
- width: 240,
+ width: 290,
fixed:'right'
},
beforeFetch: (params) => {
@@ -135,9 +128,10 @@ import { defHttp } from '/@/utils/http/axios';
console.log("🚀 ~ handleParams ~ params:", params)
defHttp.post({
url: "/iot/tq/electricityMeter/edit",
- params:params.value
+ params:params
}).then(res=>{
console.log("🚀 ~ getTableAction ~ res:", res)
+ reload();
})
}
//同步
@@ -171,6 +165,10 @@ import { defHttp } from '/@/utils/http/axios';
placement: 'topLeft',
},
},
+ {
+ label: '日志',
+ onClick: showApiLog.bind(null, record),
+ },
{
label: '同步',
onClick: handleSync.bind(null, record),
diff --git a/src/views/iot/tq/nuIotTqApiRequestLog/NuIotTqApiRequestLog.data.ts b/src/views/iot/tq/nuIotTqApiRequestLog/NuIotTqApiRequestLog.data.ts
index 0c6787a..98315c4 100644
--- a/src/views/iot/tq/nuIotTqApiRequestLog/NuIotTqApiRequestLog.data.ts
+++ b/src/views/iot/tq/nuIotTqApiRequestLog/NuIotTqApiRequestLog.data.ts
@@ -16,44 +16,80 @@ export const columns: BasicColumn[] = [
dataIndex: 'type_dictText'
},
{
- title: '请求时的值',
+ title: '上次请求时的值',
align: "center",
dataIndex: 'requestValue'
},
{
- title: '请求时间',
- align: "center",
- dataIndex: 'requestTime'
- },
- {
- title: '请求状态',
- align: "center",
- dataIndex: 'requestStatus_dictText'
- },
- {
- title: '请求描述',
- align: "center",
- dataIndex: 'requestRemark'
- },
- {
- title: '反馈值',
+ title: '本次请求值',
align: "center",
dataIndex: 'resolveValue'
},
{
- title: '反馈时间',
+ title: '本次请求时间',
+ align: "center",
+ dataIndex: 'requestTime'
+ },
+ {
+ title: '本次请求状态',
+ align: "center",
+ dataIndex: 'requestStatus_dictText'
+ },
+ {
+ title: '本次反馈时间',
align: "center",
dataIndex: 'resolveTime'
},
{
- title: '反馈状态',
+ title: '本次反馈状态',
align: "center",
dataIndex: 'resolveStatus_dictText'
},
{
title: '反馈描述',
align: "center",
- dataIndex: 'resolveRemark'
+ dataIndex: 'resolveRemark',
+ defaultHidden: true
+ },
+];
+
+//列表数据
+export const columns2: BasicColumn[] = [
+ {
+ title: '表号',
+ align: "center",
+ dataIndex: 'address'
+ },
+ {
+ title: '类型',
+ align: "center",
+ dataIndex: 'type_dictText'
+ },
+ {
+ title: '本次请求时间',
+ align: "center",
+ dataIndex: 'requestTime'
+ },
+ {
+ title: '本次请求状态',
+ align: "center",
+ dataIndex: 'requestStatus_dictText'
+ },
+ {
+ title: '本次反馈时间',
+ align: "center",
+ dataIndex: 'resolveTime'
+ },
+ {
+ title: '本次反馈状态',
+ align: "center",
+ dataIndex: 'resolveStatus_dictText'
+ },
+ {
+ title: '反馈描述',
+ align: "center",
+ dataIndex: 'resolveRemark',
+ defaultHidden: true
},
];
diff --git a/src/views/utils/departUtils/DepartUtils.data.ts b/src/views/utils/departUtils/DepartUtils.data.ts
index 7c8600e..5140323 100644
--- a/src/views/utils/departUtils/DepartUtils.data.ts
+++ b/src/views/utils/departUtils/DepartUtils.data.ts
@@ -6,24 +6,28 @@ import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
- title: '机构/部门名称',
+ title: '机构名称',
align: "center",
dataIndex: 'departName'
},
{
title: '机构编码',
align: "center",
- dataIndex: 'orgCode'
+ dataIndex: 'orgCode',
+ width: '120px'
},
{
title: '运营开始时间',
align: "center",
- dataIndex: 'operationStartTime'
+ dataIndex: 'operationStartTime',
+ width: '150px',
+ defaultHidden: true
},
{
title: '运营到期时间',
align: "center",
- dataIndex: 'operationEndTime'
+ dataIndex: 'operationEndTime',
+ width: '150px'
},
];
diff --git a/src/views/utils/departUtils/DepartUtilsList.vue b/src/views/utils/departUtils/DepartUtilsList.vue
index e9efbf0..487dd48 100644
--- a/src/views/utils/departUtils/DepartUtilsList.vue
+++ b/src/views/utils/departUtils/DepartUtilsList.vue
@@ -11,6 +11,7 @@
+ 护理机构
@@ -49,7 +50,7 @@ import { e } from 'unocss';
canResize:false,
useSearchForm: false,
actionColumn: {
- width: 120,
+ width: 80,
fixed: 'right',
},
beforeFetch: async (params) => {
@@ -105,7 +106,7 @@ function edit(record) {
departInfo.value.departName = record.departName;
departInfo.value.departServerUrl = record.orgCode;
console.log("🚀 ~ handleEdit ~ departInfo.value:", departInfo.value)
- emit("ok",departInfo);
+ emit("ok",departInfo.value);
}
/**
diff --git a/src/views/utils/nuUtils/HldyUtils.data.ts b/src/views/utils/nuUtils/HldyUtils.data.ts
index d96fdd0..14f7531 100644
--- a/src/views/utils/nuUtils/HldyUtils.data.ts
+++ b/src/views/utils/nuUtils/HldyUtils.data.ts
@@ -6,19 +6,21 @@ import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
- title: '护理单元名称',
+ title: '单元名称',
align: "center",
dataIndex: 'nuName'
},
{
- title: '编码',
+ title: '单元编码',
align: "center",
- dataIndex: 'code'
+ dataIndex: 'nuId',
+ width: '150px'
},
{
title: '创建时间',
align: "center",
- dataIndex: 'createTime'
+ dataIndex: 'createTime',
+ width: '150px'
},
];
diff --git a/src/views/utils/nuUtils/HldyUtilsIndex.vue b/src/views/utils/nuUtils/HldyUtilsIndex.vue
new file mode 100644
index 0000000..2140f55
--- /dev/null
+++ b/src/views/utils/nuUtils/HldyUtilsIndex.vue
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
diff --git a/src/views/utils/nuUtils/HldyUtilsList.vue b/src/views/utils/nuUtils/HldyUtilsList.vue
index 2c54c64..6f83c8e 100644
--- a/src/views/utils/nuUtils/HldyUtilsList.vue
+++ b/src/views/utils/nuUtils/HldyUtilsList.vue
@@ -11,6 +11,7 @@
+ 护理单元
@@ -89,10 +90,10 @@ import { e } from 'unocss';
*/
function handleEdit(record: Recordable) {
console.log("🚀 ~ handleEdit ~ record:", record)
- departInfo.value.nuId = record.id;
+ departInfo.value.nuId = record.nuId;
departInfo.value.nuName = record.nuName;
console.log("🚀 ~ handleEdit ~ departInfo.value:", departInfo.value)
- emit("ok",departInfo);
+ emit("ok",departInfo.value);
}
/**
diff --git a/src/views/utils/nuUtils/HldyUtilsModal.vue b/src/views/utils/nuUtils/HldyUtilsModal.vue
index 751ad0d..72bcbd5 100644
--- a/src/views/utils/nuUtils/HldyUtilsModal.vue
+++ b/src/views/utils/nuUtils/HldyUtilsModal.vue
@@ -1,16 +1,16 @@
-
+
+
+
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);
+ }