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 @@