From 58f448109fdcae1a91d0ccb9c51a42374aebaae1 Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Wed, 30 Jul 2025 11:17:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E8=81=94=E7=AE=A1=E7=90=86-=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=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 --- src/views/iot/baseIot/BaseIot.data.ts | 288 +++++++++++++++++++ src/views/iot/baseIot/CheckBaseIotList.vue | 17 +- src/views/iot/baseIot/compoents/DbForm.vue | 142 +++++++++ src/views/iot/baseIot/compoents/DbModal.vue | 66 +++++ src/views/iot/baseIot/compoents/SbForm.vue | 142 +++++++++ src/views/iot/baseIot/compoents/SbModal.vue | 66 +++++ src/views/iot/baseIot/compoents/SxtForm.vue | 16 +- src/views/iot/baseIot/compoents/WsdForm.vue | 142 +++++++++ src/views/iot/baseIot/compoents/WsdModal.vue | 66 +++++ 9 files changed, 940 insertions(+), 5 deletions(-) create mode 100644 src/views/iot/baseIot/compoents/DbForm.vue create mode 100644 src/views/iot/baseIot/compoents/DbModal.vue create mode 100644 src/views/iot/baseIot/compoents/SbForm.vue create mode 100644 src/views/iot/baseIot/compoents/SbModal.vue create mode 100644 src/views/iot/baseIot/compoents/WsdForm.vue create mode 100644 src/views/iot/baseIot/compoents/WsdModal.vue diff --git a/src/views/iot/baseIot/BaseIot.data.ts b/src/views/iot/baseIot/BaseIot.data.ts index 55d0877..7c0f591 100644 --- a/src/views/iot/baseIot/BaseIot.data.ts +++ b/src/views/iot/baseIot/BaseIot.data.ts @@ -72,4 +72,292 @@ export const checkSxtColumns: BasicColumn[] = [ dataIndex: 'action', width: 120, }, +]; + + +//列表数据 +export const baseDbColumns: BasicColumn[] = [ + { + title: '设备号', + align: "center", + dataIndex: 'address', + }, + { + title: '设备状态', + align: "center", + dataIndex: 'relayState', + customRender:({record})=>{ + return record.relayState?(record.relayState=='1'?'合闸':'拉闸'):''; + }, + }, + { + title: '在线状态', + align: "center", + dataIndex: 'online', + customRender:({record})=>{ + return record.online?(record.online=='true'?'在线':'离线'):''; + }, + }, + { + title: '信号强度', + align: "center", + dataIndex: 'csq', + customRender:({record})=>{ + if(record.csq){ + if(record.csq < 10){ + return '低'; + }else if(record.csq > 20){ + return '高'; + }else{ + return '中'; + } + }else{ + return ''; + } + } + }, + { + title: 'NUID', + align: "center", + dataIndex: 'nuId', + }, + { + title: '操作', + align: "center", + dataIndex: 'action', + width: 120, + }, +]; + +export const checkDbColumns: BasicColumn[] = [ + { + title: '设备号', + align: "center", + dataIndex: 'cid', + }, + { + title: '设备状态', + align: "center", + dataIndex: 'relayState', + customRender:({record})=>{ + return record.relayState?(record.relayState=='1'?'合闸':'拉闸'):''; + }, + }, + { + title: '在线状态', + align: "center", + dataIndex: 'online', + customRender:({record})=>{ + return record.online?(record.online=='true'?'在线':'离线'):''; + }, + }, + { + title: '信号强度', + align: "center", + dataIndex: 'csq', + customRender:({record})=>{ + if(record.csq){ + if(record.csq < 10){ + return '低'; + }else if(record.csq > 20){ + return '高'; + }else{ + return '中'; + } + }else{ + return ''; + } + } + }, + { + title: '操作', + align: "center", + dataIndex: 'action', + width: 120, + }, +]; + + + + +//列表数据 +export const baseSbColumns: BasicColumn[] = [ + { + title: '设备号', + align: "center", + dataIndex: 'address', + }, + { + title: '设备状态', + align: "center", + dataIndex: 'relayState', + customRender:({record})=>{ + return record.relayState?(record.relayState=='1'?'开阀':'关阀'):''; + }, + }, + { + title: '在线状态', + align: "center", + dataIndex: 'online', + customRender:({record})=>{ + return record.online?(record.online=='true'?'在线':'离线'):''; + }, + }, + { + title: '信号强度', + align: "center", + dataIndex: 'csq', + customRender:({record})=>{ + if(record.csq){ + if(record.csq < 10){ + return '低'; + }else if(record.csq > 20){ + return '高'; + }else{ + return '中'; + } + }else{ + return ''; + } + } + }, + { + title: 'NUID', + align: "center", + dataIndex: 'nuId', + }, + { + title: '操作', + align: "center", + dataIndex: 'action', + width: 120, + }, +]; + +export const checkSbColumns: BasicColumn[] = [ + { + title: '设备号', + align: "center", + dataIndex: 'cid', + }, + { + title: '设备状态', + align: "center", + dataIndex: 'relayState', + customRender:({record})=>{ + return record.relayState?(record.relayState=='1'?'开阀':'关阀'):''; + }, + }, + { + title: '在线状态', + align: "center", + dataIndex: 'online', + customRender:({record})=>{ + return record.online?(record.online=='true'?'在线':'离线'):''; + }, + }, + { + title: '信号强度', + align: "center", + dataIndex: 'csq', + customRender:({record})=>{ + if(record.csq){ + if(record.csq < 10){ + return '低'; + }else if(record.csq > 20){ + return '高'; + }else{ + return '中'; + } + }else{ + return ''; + } + } + }, + { + title: '操作', + align: "center", + dataIndex: 'action', + width: 120, + }, +]; + + + +//列表数据 +export const baseWsdColumns: BasicColumn[] = [ + { + title: '设备号', + align: "center", + dataIndex: 'sn' + }, + { + title: '设备名称', + align: "center", + dataIndex: 'deviceName' + }, + { + title: '在线状态', + align: "center", + dataIndex: 'status', + customRender:({record})=>{ + return record.status?(record.status=='0'?'在线':'离线'):''; + }, + }, + { + title: '启用状态', + align: "center", + dataIndex: 'delFlag', + customRender:({record})=>{ + return record.delFlag?(record.delFlag=='0'?'启用':'停用'):''; + }, + }, + { + title: 'NUID', + align: "center", + dataIndex: 'nuId' + }, + { + title: '操作', + align: "center", + dataIndex: 'action', + width: 120, + }, +]; + + +//列表数据 +export const checkWsdColumns: BasicColumn[] = [ + { + title: '设备号', + align: "center", + dataIndex: 'sn' + }, + { + title: '设备名称', + align: "center", + dataIndex: 'deviceName' + }, + { + title: '在线状态', + align: "center", + dataIndex: 'status', + customRender:({record})=>{ + return record.status?(record.status=='0'?'在线':'离线'):''; + }, + }, + { + title: '启用状态', + align: "center", + dataIndex: 'delFlag', + customRender:({record})=>{ + return record.delFlag?(record.delFlag=='0'?'启用':'停用'):''; + }, + }, + { + title: '操作', + align: "center", + dataIndex: 'action', + width: 120, + }, ]; \ No newline at end of file diff --git a/src/views/iot/baseIot/CheckBaseIotList.vue b/src/views/iot/baseIot/CheckBaseIotList.vue index 7831ae6..8c5a4e6 100644 --- a/src/views/iot/baseIot/CheckBaseIotList.vue +++ b/src/views/iot/baseIot/CheckBaseIotList.vue @@ -36,8 +36,6 @@
- - {{orgInfo.departName}} - 物联设备配置 返回上一页 @@ -69,6 +67,9 @@
+ + + @@ -77,9 +78,15 @@ import { defHttp } from '/@/utils/http/axios'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import SxtModal from '/@/views/iot/baseIot/compoents/SxtModal.vue'; + import DbModal from '/@/views/iot/baseIot/compoents/DbModal.vue'; + import SbModal from '/@/views/iot/baseIot/compoents/SbModal.vue'; + import WsdModal from '/@/views/iot/baseIot/compoents/WsdModal.vue'; const formRef = ref(); const sxtModal = ref(); + const dbModal = ref(); + const sbModal = ref(); + const wsdModal = ref(); const queryParam = reactive({}); const activeKey= ref('1'); @@ -132,14 +139,20 @@ function searchReset() { //选择电表 function handleDb(item){ console.log("🚀 ~ handleDb ~ item:", item) + item.orgInfo = orgInfo.value; + dbModal.value.init(item); } //选择水表 function handleSb(item){ console.log("🚀 ~ handleSb ~ item:", item) + item.orgInfo = orgInfo.value; + sbModal.value.init(item); } //选择温湿度计 function handleWsd(item){ console.log("🚀 ~ handleWsd ~ item:", item) + item.orgInfo = orgInfo.value; + wsdModal.value.init(item); } //物联设备同步后刷新列表 diff --git a/src/views/iot/baseIot/compoents/DbForm.vue b/src/views/iot/baseIot/compoents/DbForm.vue new file mode 100644 index 0000000..4a5f4fc --- /dev/null +++ b/src/views/iot/baseIot/compoents/DbForm.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/src/views/iot/baseIot/compoents/DbModal.vue b/src/views/iot/baseIot/compoents/DbModal.vue new file mode 100644 index 0000000..623b30f --- /dev/null +++ b/src/views/iot/baseIot/compoents/DbModal.vue @@ -0,0 +1,66 @@ + + + + + + diff --git a/src/views/iot/baseIot/compoents/SbForm.vue b/src/views/iot/baseIot/compoents/SbForm.vue new file mode 100644 index 0000000..df57387 --- /dev/null +++ b/src/views/iot/baseIot/compoents/SbForm.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/src/views/iot/baseIot/compoents/SbModal.vue b/src/views/iot/baseIot/compoents/SbModal.vue new file mode 100644 index 0000000..42d7545 --- /dev/null +++ b/src/views/iot/baseIot/compoents/SbModal.vue @@ -0,0 +1,66 @@ + + + + + + diff --git a/src/views/iot/baseIot/compoents/SxtForm.vue b/src/views/iot/baseIot/compoents/SxtForm.vue index 2c48003..3552d96 100644 --- a/src/views/iot/baseIot/compoents/SxtForm.vue +++ b/src/views/iot/baseIot/compoents/SxtForm.vue @@ -3,10 +3,18 @@
NUID:{{baseIotInfo.nuId}} - 护理单元名称:{{baseIotInfo.nuName}} - 护理单元类型:{{baseIotInfo.areaFlagText}} + 单元名称:{{baseIotInfo.nuName}} + 单元类型:{{baseIotInfo.areaFlagText}}
+
+ 是否分配: + + 全部 + 已分配 + 未分配 + +