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