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