169 lines
3.6 KiB
TypeScript
169 lines
3.6 KiB
TypeScript
|
import {BasicColumn} from '/@/components/Table';
|
||
|
import {FormSchema} from '/@/components/Table';
|
||
|
|
||
|
//列表数据
|
||
|
export const columns: BasicColumn[] = [
|
||
|
{
|
||
|
title: '单元编码',
|
||
|
align: "center",
|
||
|
dataIndex: 'nuId'
|
||
|
},
|
||
|
{
|
||
|
title: '单元名称',
|
||
|
align: "center",
|
||
|
dataIndex: 'nuName'
|
||
|
},
|
||
|
{
|
||
|
title: '设备号',
|
||
|
align: "center",
|
||
|
dataIndex: 'address'
|
||
|
},
|
||
|
{
|
||
|
title: '机构名称',
|
||
|
align: "center",
|
||
|
dataIndex: 'departName',
|
||
|
width: 220,
|
||
|
},
|
||
|
// {
|
||
|
// title: '采集器号',
|
||
|
// align: "center",
|
||
|
// dataIndex: 'cid'
|
||
|
// },
|
||
|
{
|
||
|
title: '设备状态',
|
||
|
align: "center",
|
||
|
dataIndex: 'relayState',
|
||
|
customRender:({record})=>{
|
||
|
return record.relayState?(record.relayState=='1'?'合闸':'拉闸'):'';
|
||
|
},
|
||
|
},
|
||
|
// {
|
||
|
// title: '电池状态',
|
||
|
// align: "center",
|
||
|
// dataIndex: 'batteryState',
|
||
|
// customRender:({record})=>{
|
||
|
// return record.batteryState?(record.batteryState=='0'?'正常':'低电'):'';
|
||
|
// },
|
||
|
// },
|
||
|
{
|
||
|
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: '用水量m³',
|
||
|
align: "center",
|
||
|
dataIndex: 'waterValue'
|
||
|
},
|
||
|
{
|
||
|
title: '上次抄表时间',
|
||
|
align: "center",
|
||
|
dataIndex: 'readTime'
|
||
|
},
|
||
|
{
|
||
|
title: '上次上线时间',
|
||
|
align: "center",
|
||
|
dataIndex: 'connectTime'
|
||
|
},
|
||
|
// {
|
||
|
// title: '上次掉线时间',
|
||
|
// align: "center",
|
||
|
// dataIndex: 'disconnectTime'
|
||
|
// },
|
||
|
// {
|
||
|
// title: '描述',
|
||
|
// align: "center",
|
||
|
// dataIndex: 'remark'
|
||
|
// },
|
||
|
];
|
||
|
|
||
|
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: 'address',
|
||
|
component: 'Input',
|
||
|
colProps: { span: 6 },
|
||
|
},
|
||
|
{
|
||
|
label: '设备状态',
|
||
|
field: 'relayState',
|
||
|
component: 'JDictSelectTag',
|
||
|
componentProps: {
|
||
|
placeholder: '请选择状态',
|
||
|
options: [
|
||
|
{ label: '合闸', value: '1' },
|
||
|
{ label: '拉闸', value: '0' },
|
||
|
],
|
||
|
},
|
||
|
colProps: { span: 6 },
|
||
|
},
|
||
|
{
|
||
|
label: '在线状态',
|
||
|
field: 'online',
|
||
|
component: 'JDictSelectTag',
|
||
|
componentProps: {
|
||
|
placeholder: '请选择状态',
|
||
|
options: [
|
||
|
{ label: '在线', value: 'true' },
|
||
|
{ label: '离线', value: 'false' },
|
||
|
],
|
||
|
},
|
||
|
colProps: { span: 6 },
|
||
|
},
|
||
|
{
|
||
|
label: '信号强度',
|
||
|
field: 'csq',
|
||
|
component: 'JDictSelectTag',
|
||
|
componentProps: {
|
||
|
placeholder: '请选择强度',
|
||
|
options: [
|
||
|
{ label: '高', value: '1' },
|
||
|
{ label: '中', value: '2' },
|
||
|
{ label: '低', value: '3' },
|
||
|
],
|
||
|
},
|
||
|
colProps: { span: 6 },
|
||
|
},
|
||
|
];
|