2025-07-03 17:40:00 +08:00
|
|
|
import {BasicColumn} from '/@/components/Table';
|
|
|
|
|
import {FormSchema} from '/@/components/Table';
|
|
|
|
|
|
|
|
|
|
//列表数据
|
|
|
|
|
export const columns: BasicColumn[] = [
|
2025-07-09 08:53:04 +08:00
|
|
|
// {
|
|
|
|
|
// title: '单元编码',
|
|
|
|
|
// align: "center",
|
|
|
|
|
// dataIndex: 'nuId'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// title: '单元名称',
|
|
|
|
|
// align: "center",
|
|
|
|
|
// dataIndex: 'nuName'
|
|
|
|
|
// },
|
2025-07-03 17:40:00 +08:00
|
|
|
{
|
2026-03-02 17:38:15 +08:00
|
|
|
title: '序号',
|
|
|
|
|
align: "center",
|
|
|
|
|
dataIndex: 'id'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '设备序号',
|
2025-07-03 17:40:00 +08:00
|
|
|
align: "center",
|
|
|
|
|
dataIndex: 'address'
|
|
|
|
|
},
|
2025-07-09 08:53:04 +08:00
|
|
|
// {
|
|
|
|
|
// title: '机构名称',
|
|
|
|
|
// align: "center",
|
|
|
|
|
// dataIndex: 'departName',
|
|
|
|
|
// width: 220,
|
|
|
|
|
// },
|
2025-07-03 17:40:00 +08:00
|
|
|
// {
|
|
|
|
|
// title: '采集器号',
|
|
|
|
|
// align: "center",
|
|
|
|
|
// dataIndex: 'cid'
|
|
|
|
|
// },
|
2026-03-02 17:38:15 +08:00
|
|
|
{
|
|
|
|
|
title: '设备维度',
|
|
|
|
|
align: "center",
|
|
|
|
|
dataIndex: 'dimension'
|
|
|
|
|
},
|
2025-07-03 17:40:00 +08:00
|
|
|
{
|
|
|
|
|
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'?'在线':'离线'):'';
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
2026-03-02 17:38:15 +08:00
|
|
|
title: '分配状态',
|
2025-07-03 17:40:00 +08:00
|
|
|
align: "center",
|
2026-03-02 17:38:15 +08:00
|
|
|
dataIndex: 'izAllocate',
|
2025-07-03 17:40:00 +08:00
|
|
|
customRender:({record})=>{
|
2026-03-02 17:38:15 +08:00
|
|
|
if(record.izAllocate=='Y'){
|
|
|
|
|
return "已分配";
|
2025-07-03 17:40:00 +08:00
|
|
|
}else{
|
2026-03-02 17:38:15 +08:00
|
|
|
return "未分配";
|
2025-07-03 17:40:00 +08:00
|
|
|
}
|
2026-03-02 17:38:15 +08:00
|
|
|
},
|
2025-07-03 17:40:00 +08:00
|
|
|
},
|
2026-03-02 17:38:15 +08:00
|
|
|
// {
|
|
|
|
|
// title: '电池状态',
|
|
|
|
|
// align: "center",
|
|
|
|
|
// dataIndex: 'batteryState',
|
|
|
|
|
// customRender:({record})=>{
|
|
|
|
|
// return record.batteryState?(record.batteryState=='0'?'正常':'低电'):'';
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// 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 '';
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// },
|
2025-07-03 17:40:00 +08:00
|
|
|
{
|
|
|
|
|
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[] = [
|
2025-07-09 08:53:04 +08:00
|
|
|
// {
|
|
|
|
|
// label: '机构',
|
|
|
|
|
// field: 'deviceStatus',
|
|
|
|
|
// component: 'JDictSelectTag',
|
|
|
|
|
// componentProps: {
|
|
|
|
|
// placeholder: '请选择机构',
|
|
|
|
|
// dictCode: 'sys_depart,depart_name,id,org_category = 1 order by depart_name asc',
|
|
|
|
|
// },
|
|
|
|
|
// colProps: { span: 6 },
|
|
|
|
|
// },
|
|
|
|
|
// {
|
2025-08-04 15:10:31 +08:00
|
|
|
// label: '区域',
|
2025-07-09 08:53:04 +08:00
|
|
|
// field: 'deviceStatus',
|
|
|
|
|
// component: 'JDictSelectTag',
|
|
|
|
|
// componentProps: {
|
2025-08-04 15:10:31 +08:00
|
|
|
// placeholder: '请选择区域',
|
2025-07-09 08:53:04 +08:00
|
|
|
// dictCode: 'nu_base_info,nu_name,id,del_flag = 0 order by nu_name asc',
|
|
|
|
|
// },
|
|
|
|
|
// colProps: { span: 6 },
|
|
|
|
|
// },
|
2026-03-02 17:38:15 +08:00
|
|
|
// {
|
|
|
|
|
// label: '设备号',
|
|
|
|
|
// field: 'address',
|
|
|
|
|
// component: 'Input',
|
|
|
|
|
// colProps: { span: 4 },
|
|
|
|
|
// },
|
2025-07-03 17:40:00 +08:00
|
|
|
{
|
|
|
|
|
label: '设备状态',
|
|
|
|
|
field: 'relayState',
|
|
|
|
|
component: 'JDictSelectTag',
|
|
|
|
|
componentProps: {
|
|
|
|
|
placeholder: '请选择状态',
|
|
|
|
|
options: [
|
|
|
|
|
{ label: '合闸', value: '1' },
|
|
|
|
|
{ label: '拉闸', value: '0' },
|
|
|
|
|
],
|
|
|
|
|
},
|
2026-03-02 17:38:15 +08:00
|
|
|
// colProps: { span: 4 },
|
2025-07-03 17:40:00 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '在线状态',
|
|
|
|
|
field: 'online',
|
|
|
|
|
component: 'JDictSelectTag',
|
|
|
|
|
componentProps: {
|
|
|
|
|
placeholder: '请选择状态',
|
|
|
|
|
options: [
|
|
|
|
|
{ label: '在线', value: 'true' },
|
|
|
|
|
{ label: '离线', value: 'false' },
|
|
|
|
|
],
|
|
|
|
|
},
|
2026-03-02 17:38:15 +08:00
|
|
|
// colProps: { span: 4 },
|
2025-07-03 17:40:00 +08:00
|
|
|
},
|
2026-03-02 17:38:15 +08:00
|
|
|
// {
|
|
|
|
|
// label: '信号强度',
|
|
|
|
|
// field: 'csq',
|
|
|
|
|
// component: 'JDictSelectTag',
|
|
|
|
|
// componentProps: {
|
|
|
|
|
// placeholder: '请选择强度',
|
|
|
|
|
// options: [
|
|
|
|
|
// { label: '高', value: '1' },
|
|
|
|
|
// { label: '中', value: '2' },
|
|
|
|
|
// { label: '低', value: '3' },
|
|
|
|
|
// ],
|
|
|
|
|
// },
|
|
|
|
|
// colProps: { span: 4 },
|
|
|
|
|
// },
|
2025-07-03 17:40:00 +08:00
|
|
|
{
|
2026-03-02 17:38:15 +08:00
|
|
|
label: '分配状态',
|
|
|
|
|
field: 'izAllocate',
|
2025-07-03 17:40:00 +08:00
|
|
|
component: 'JDictSelectTag',
|
|
|
|
|
componentProps: {
|
2026-03-02 17:38:15 +08:00
|
|
|
placeholder: '请选择分配状态',
|
2025-07-03 17:40:00 +08:00
|
|
|
options: [
|
2026-03-02 17:38:15 +08:00
|
|
|
{label: '已分配', value: 'Y'},
|
|
|
|
|
{label: '未分配', value: 'N'},
|
2025-07-03 17:40:00 +08:00
|
|
|
],
|
|
|
|
|
},
|
2026-03-02 17:38:15 +08:00
|
|
|
//colProps: { span: 4 },
|
|
|
|
|
}
|
2025-07-03 17:40:00 +08:00
|
|
|
];
|