2025-06-23 08:57:05 +08:00
|
|
|
import {BasicColumn} from '/@/components/Table';
|
|
|
|
import {FormSchema} from '/@/components/Table';
|
|
|
|
|
|
|
|
//列表数据
|
|
|
|
export const columns: BasicColumn[] = [
|
|
|
|
{
|
|
|
|
title: '单元编码',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'nuId'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '单元名称',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'nuName'
|
|
|
|
},
|
|
|
|
{
|
2025-06-30 10:14:24 +08:00
|
|
|
title: 'SN',
|
2025-06-23 08:57:05 +08:00
|
|
|
align: "center",
|
|
|
|
dataIndex: 'sn'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '设备名称',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'deviceName'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '机构',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'departName'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '温度',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'temperature'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '湿度',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'humidity'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '最新上报时间',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'reportingTime'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '告警数',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'alarmCn',
|
|
|
|
defaultHidden: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '记录间隔',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'recordInterval',
|
|
|
|
defaultHidden: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '上报间隔',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'reportingInterval',
|
|
|
|
defaultHidden: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '电量',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'electricity',
|
|
|
|
defaultHidden: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '在线状态',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'status',
|
|
|
|
customRender:({record})=>{
|
|
|
|
return record.status?(record.status=='0'?'在线':'离线'):'';
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
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 },
|
|
|
|
},
|
|
|
|
{
|
2025-06-30 10:14:24 +08:00
|
|
|
label: 'SN',
|
2025-06-23 08:57:05 +08:00
|
|
|
field: 'sn',
|
|
|
|
component: 'Input',
|
|
|
|
colProps: { span: 6 },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '在线状态',
|
|
|
|
field: 'status',
|
|
|
|
component: 'JDictSelectTag',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请选择状态',
|
|
|
|
options: [
|
|
|
|
{ label: '在线', value: '0' },
|
|
|
|
{ label: '离线', value: '1' },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
colProps: { span: 6 },
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export const formSchema: FormSchema[] = [
|
|
|
|
{
|
|
|
|
label: '',
|
|
|
|
field: 'isUpdate',
|
|
|
|
component: 'Input',
|
|
|
|
ifShow: false,
|
|
|
|
},
|
|
|
|
{
|
2025-06-30 10:14:24 +08:00
|
|
|
label: 'SN',
|
2025-06-23 08:57:05 +08:00
|
|
|
field: 'sn',
|
|
|
|
component: 'Input',
|
|
|
|
dynamicDisabled: ({ values }) => {
|
|
|
|
return values.isUpdate;
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '设备名称',
|
|
|
|
field: 'deviceName',
|
|
|
|
component: 'Input',
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '时区',
|
|
|
|
field: 'timeCode',
|
|
|
|
component: 'JDictSelectTag',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请选择时区',
|
|
|
|
options: [
|
|
|
|
{ label: '北京时间', value: '01' },
|
|
|
|
/* { label: '纽约时间', value: '02' },*/
|
|
|
|
],
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '设备类型',
|
|
|
|
field: 'deviceTypes',
|
|
|
|
component: 'Input',
|
|
|
|
show: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '记录间隔(分钟)',
|
|
|
|
field: 'recordInterval',
|
|
|
|
component: 'InputNumber',
|
|
|
|
ifShow: ({ values }) => {
|
|
|
|
//有值就是显示
|
|
|
|
return values.isUpdate;
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '上报间隔(分钟)',
|
|
|
|
field: 'reportingInterval',
|
|
|
|
component: 'InputNumber',
|
|
|
|
ifShow: ({ values }) => {
|
|
|
|
//有值就是显示
|
|
|
|
return values.isUpdate;
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '历史上报时刻(00:00)',
|
|
|
|
field: 'historyReportTime',
|
|
|
|
component: 'Input',
|
|
|
|
componentProps: {
|
|
|
|
size:'default',
|
|
|
|
showNow: true,
|
|
|
|
},
|
|
|
|
ifShow: ({ values }) => {
|
|
|
|
//有值就是显示
|
|
|
|
return values.isUpdate;
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '历史上报间隔(小时)',
|
|
|
|
field: 'historyInterval',
|
|
|
|
component: 'InputNumber',
|
|
|
|
ifShow: ({ values }) => {
|
|
|
|
//有值就是显示
|
|
|
|
return values.isUpdate;
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '温度预警-上限',
|
|
|
|
field: 'temperatureHigh',
|
|
|
|
component: 'InputNumber',
|
|
|
|
ifShow: ({ values }) => {
|
|
|
|
//有值就是显示
|
|
|
|
return values.isUpdate;
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '温度预警-下限',
|
|
|
|
field: 'temperatureLow',
|
|
|
|
component: 'InputNumber',
|
|
|
|
ifShow: ({ values }) => {
|
|
|
|
//有值就是显示
|
|
|
|
return values.isUpdate;
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '温度缓冲值',
|
|
|
|
field: 'temperatureBuffer',
|
|
|
|
component: 'InputNumber',
|
|
|
|
ifShow: ({ values }) => {
|
|
|
|
//有值就是显示
|
|
|
|
return values.isUpdate;
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '湿度预警-上限',
|
|
|
|
field: 'humidityHigh',
|
|
|
|
component: 'InputNumber',
|
|
|
|
ifShow: ({ values }) => {
|
|
|
|
//有值就是显示
|
|
|
|
return values.isUpdate;
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '湿度预警-下限',
|
|
|
|
field: 'humidityLow',
|
|
|
|
component: 'InputNumber',
|
|
|
|
ifShow: ({ values }) => {
|
|
|
|
//有值就是显示
|
|
|
|
return values.isUpdate;
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '湿度缓冲值',
|
|
|
|
field: 'humidityBuffer',
|
|
|
|
component: 'InputNumber',
|
|
|
|
ifShow: ({ values }) => {
|
|
|
|
//有值就是显示
|
|
|
|
return values.isUpdate;
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '断电报警开关',
|
|
|
|
field: 'izOutages',
|
|
|
|
component: 'JDictSelectTag',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请选择开关',
|
|
|
|
options: [
|
|
|
|
{ label: '开启', value: '0' },
|
|
|
|
{ label: '关闭', value: '1' },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
ifShow: ({ values }) => {
|
|
|
|
//有值就是显示
|
|
|
|
return values.isUpdate;
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '低电报警开关',
|
|
|
|
field: 'izLowBattery',
|
|
|
|
component: 'JDictSelectTag',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请选择开关',
|
|
|
|
options: [
|
|
|
|
{ label: '开启', value: '0' },
|
|
|
|
{ label: '关闭', value: '1' },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
ifShow: ({ values }) => {
|
|
|
|
//有值就是显示
|
|
|
|
return values.isUpdate;
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '上下线通知开关',
|
|
|
|
field: 'izOnline',
|
|
|
|
component: 'JDictSelectTag',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请选择开关',
|
|
|
|
options: [
|
|
|
|
{ label: '开启', value: '0' },
|
|
|
|
{ label: '关闭', value: '1' },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
ifShow: ({ values }) => {
|
|
|
|
//有值就是显示
|
|
|
|
return values.isUpdate;
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
labelWidth: '160px'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '读取参数',
|
|
|
|
field: 'id',
|
|
|
|
component: 'Input',
|
|
|
|
slot: 'customInput',
|
|
|
|
ifShow: ({ values }) => {
|
|
|
|
//有值就是显示
|
|
|
|
return values.isUpdate;
|
|
|
|
},
|
|
|
|
labelWidth: '160px'
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
//列表数据
|
|
|
|
export const logColumns: BasicColumn[] = [
|
|
|
|
{
|
2025-06-30 10:14:24 +08:00
|
|
|
title: 'SN',
|
2025-06-23 08:57:05 +08:00
|
|
|
align: "center",
|
|
|
|
dataIndex: 'sn'
|
|
|
|
},
|
|
|
|
{
|
2025-06-30 10:14:24 +08:00
|
|
|
title: '抄表时间',
|
2025-06-23 08:57:05 +08:00
|
|
|
align: "center",
|
|
|
|
dataIndex: 'optTime'
|
|
|
|
},
|
2025-06-30 10:14:24 +08:00
|
|
|
// {
|
|
|
|
// title: '数据上报时间',
|
|
|
|
// align: "center",
|
|
|
|
// dataIndex: 'reportingTime'
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// title: '操作人',
|
|
|
|
// align: "center",
|
|
|
|
// dataIndex: 'optBy'
|
|
|
|
// },
|
2025-06-23 08:57:05 +08:00
|
|
|
{
|
2025-06-30 10:14:24 +08:00
|
|
|
title: '温度',
|
2025-06-23 08:57:05 +08:00
|
|
|
align: "center",
|
2025-06-30 10:14:24 +08:00
|
|
|
dataIndex: 'temperature',
|
2025-06-23 08:57:05 +08:00
|
|
|
},
|
|
|
|
{
|
2025-06-30 10:14:24 +08:00
|
|
|
title: '湿度',
|
2025-06-23 08:57:05 +08:00
|
|
|
align: "center",
|
2025-06-30 10:14:24 +08:00
|
|
|
dataIndex: 'humidity',
|
2025-06-23 08:57:05 +08:00
|
|
|
},
|
2025-06-30 10:14:24 +08:00
|
|
|
// {
|
|
|
|
// title: '设备状态',
|
|
|
|
// align: "center",
|
|
|
|
// dataIndex: 'status',
|
|
|
|
// customRender:({record})=>{
|
|
|
|
// return record.status?(record.status=='0'?'在线':'离线'):'';
|
|
|
|
// },
|
|
|
|
// },
|
2025-06-23 08:57:05 +08:00
|
|
|
{
|
2025-06-30 10:14:24 +08:00
|
|
|
title: '状态',
|
2025-06-23 08:57:05 +08:00
|
|
|
align: "center",
|
2025-06-30 10:14:24 +08:00
|
|
|
dataIndex: 'status',
|
2025-06-23 08:57:05 +08:00
|
|
|
customRender:({record})=>{
|
2025-06-30 10:14:24 +08:00
|
|
|
return record.status?(record.status=='0'?'抄表成功':'抄表失败'):'';
|
2025-06-23 08:57:05 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export const logQuerySchema: FormSchema[] = [
|
|
|
|
{
|
|
|
|
label: '操作类型',
|
|
|
|
field: 'optType',
|
|
|
|
component: 'JDictSelectTag',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请选择操作类型',
|
|
|
|
options: [
|
|
|
|
{ label: '新增', value: 'insert' },
|
|
|
|
{ label: '修改', value: 'update' },
|
|
|
|
{ label: '删除', value: 'delete' },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
colProps: { span: 6 },
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
//列表数据
|
|
|
|
export const alarmColumns: BasicColumn[] = [
|
|
|
|
{
|
2025-06-30 10:14:24 +08:00
|
|
|
title: 'SN',
|
2025-06-23 08:57:05 +08:00
|
|
|
align: "center",
|
|
|
|
dataIndex: 'sn'
|
|
|
|
},
|
2025-06-30 14:54:10 +08:00
|
|
|
// {
|
|
|
|
// title: '状态',
|
|
|
|
// align: "center",
|
|
|
|
// dataIndex: 'status',
|
|
|
|
// customRender:({record})=>{
|
|
|
|
// if(record.optType == '0'){
|
|
|
|
// return '告警';
|
|
|
|
// }else {
|
|
|
|
// return '清除';
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// },
|
2025-06-23 08:57:05 +08:00
|
|
|
{
|
|
|
|
title: '告警时间',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'wrDate'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '告警内容',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'wrContent'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '告警值',
|
|
|
|
align: "center",
|
|
|
|
dataIndex: 'wrData'
|
|
|
|
},
|
|
|
|
{
|
2025-06-30 14:54:10 +08:00
|
|
|
title: '消除告警时间',
|
2025-06-23 08:57:05 +08:00
|
|
|
align: "center",
|
|
|
|
dataIndex: 'clearDate'
|
|
|
|
},
|
2025-06-30 14:54:10 +08:00
|
|
|
// {
|
|
|
|
// title: '清除内容',
|
|
|
|
// align: "center",
|
|
|
|
// dataIndex: 'clearContent'
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// title: '清除值',
|
|
|
|
// align: "center",
|
|
|
|
// dataIndex: 'clearData'
|
|
|
|
// },
|
2025-06-23 08:57:05 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
export const alarmQuerySchema: FormSchema[] = [
|
|
|
|
{
|
|
|
|
label: '告警状态',
|
|
|
|
field: 'status',
|
|
|
|
component: 'JDictSelectTag',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请选择告警状态',
|
|
|
|
options: [
|
|
|
|
{ label: '告警', value: '0' },
|
|
|
|
{ label: '清除', value: '1' },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
colProps: { span: 6 },
|
|
|
|
},
|
|
|
|
];
|