hldy_yunwei_vue/src/views/iot/tplink/camera/camera.data.ts

311 lines
6.0 KiB
TypeScript
Raw Normal View History

2025-07-03 17:40:00 +08:00
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import dayjs from 'dayjs';
//列表数据
export const columns: BasicColumn[] = [
{
title: '设备序号',
align: "center",
dataIndex: 'deviceIndex'
},
{
title: '设备名称',
align: "center",
dataIndex: 'deviceName'
},
{
title: '设备状态',
align: "center",
dataIndex: 'deviceStatus_dictText'
},
{
title: '设备型号',
align: "center",
dataIndex: 'deviceModel'
},
2025-07-09 08:53:04 +08:00
// {
// title: 'IP地址',
// align: "center",
// dataIndex: 'ip'
// },
// {
// title: 'MAC地址',
// align: "center",
// dataIndex: 'mac'
// },
// {
// title: '区域名称',
// align: "center",
// dataIndex: 'regionName'
// },
// {
// title: '父设备名称',
// align: "center",
// dataIndex: 'parentDeviceName'
// },
// {
// title: '项目名称',
// align: "center",
// dataIndex: 'projectName'
// },
// {
// title: '位置名称',
// align: "center",
// dataIndex: 'locationName'
// },
// {
// title: '区域',
2025-07-09 08:53:04 +08:00
// align: "center",
// dataIndex: 'nuId_dictText',
// },
// {
// title: '区域',
2025-07-09 08:53:04 +08:00
// align: "center",
// dataIndex: 'nuName'
// },
2025-07-03 17:40:00 +08:00
{
2025-07-09 08:53:04 +08:00
title: 'FTP地址',
2025-07-03 17:40:00 +08:00
align: "center",
2025-07-09 08:53:04 +08:00
dataIndex: 'ftpIp'
2025-07-03 17:40:00 +08:00
},
{
2025-07-09 08:53:04 +08:00
title: 'FTP端口',
2025-07-03 17:40:00 +08:00
align: "center",
2025-07-09 08:53:04 +08:00
dataIndex: 'ftpPort'
2025-07-03 17:40:00 +08:00
},
{
2025-07-09 08:53:04 +08:00
title: 'FTP用户',
2025-07-03 17:40:00 +08:00
align: "center",
2025-07-09 08:53:04 +08:00
dataIndex: 'ftpUsername'
2025-07-03 17:40:00 +08:00
},
{
2025-07-09 08:53:04 +08:00
title: 'FTP密码',
2025-07-03 17:40:00 +08:00
align: "center",
2025-07-09 08:53:04 +08:00
dataIndex: 'ftpPassword'
2025-07-03 17:40:00 +08:00
},
{
2025-07-09 08:53:04 +08:00
title: 'FTP上传路径',
2025-07-03 17:40:00 +08:00
align: "center",
2025-07-09 08:53:04 +08:00
dataIndex: 'ftpUploadpath'
2025-07-03 17:40:00 +08:00
},
];
export const formSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
{
label: '设备序号',
field: 'deviceIndex',
component: 'Input',
// dynamicDisabled: ({value})=>{
// return true;
// }
dynamicDisabled: true
},
{
label: '设备名称',
field: 'deviceName',
component: 'Input',
},
{
label: '设备状态',
field: 'deviceStatus',
component: 'JDictSelectTag',
componentProps: {
dictCode: 'tplink_status',
placeholder: '请选择设备状态',
},
dynamicDisabled: true
},
{
label: '设备型号',
field: 'deviceModel',
component: 'Input',
dynamicDisabled: true
},
2025-07-09 08:53:04 +08:00
// {
// label: 'IP地址',
// field: 'ip',
// component: 'Input',
// dynamicDisabled: true
// },
// {
// label: 'MAC地址',
// field: 'mac',
// component: 'Input',
// dynamicDisabled: true
// },
// {
// label: '区域名称',
// field: 'regionName',
// component: 'Input',
// dynamicDisabled: true
// },
// {
// label: '父设备名称',
// field: 'parentDeviceName',
// component: 'Input',
// dynamicDisabled: true
// },
// {
// label: '项目ID',
// field: 'projectId',
// component: 'Input',
// show: false,
// },
// {
// label: '项目名称',
// field: 'projectName',
// component: 'Input',
// dynamicDisabled: true
// },
// {
// label: '位置名称',
// field: 'locationName',
// component: 'Input',
// dynamicDisabled: true
// },
// {
// label: '区域',
2025-07-09 08:53:04 +08:00
// field: 'nuId',
// component: 'JSelectNu',
// componentProps: {
// rowKey: 'nuId',
// labelKey: 'nuName',
// selectType: true,
// },
// },
2025-07-03 17:40:00 +08:00
{
2025-07-09 08:53:04 +08:00
label: 'FTP地址',
field: 'ftpIp',
2025-07-03 17:40:00 +08:00
component: 'Input',
},
{
2025-07-09 08:53:04 +08:00
label: 'FTP端口',
field: 'ftpPort',
2025-07-03 17:40:00 +08:00
component: 'Input',
},
{
2025-07-09 08:53:04 +08:00
label: 'FTP用户',
field: 'ftpUsername',
2025-07-03 17:40:00 +08:00
component: 'Input',
},
{
2025-07-09 08:53:04 +08:00
label: 'FTP密码',
field: 'ftpPassword',
2025-07-03 17:40:00 +08:00
component: 'Input',
},
{
2025-07-09 08:53:04 +08:00
label: 'FTP上传路径',
field: 'ftpUploadpath',
2025-07-03 17:40:00 +08:00
component: 'Input',
}
];
export const searchFormSchema: FormSchema[] = [
{
label: '设备状态',
field: 'deviceStatus',
component: 'JDictSelectTag',
componentProps: {
dictCode: 'tplink_status',
placeholder: '请选择状态',
stringToNumber: true,
},
//colProps: { span: 6 },
},
];
//列表数据
export const recordingColumns: BasicColumn[] = [
{
title: '开始时间',
align: "center",
dataIndex: 'startTimeFt'
},
{
title: '结束时间',
align: "center",
dataIndex: 'endTimeFt'
},
{
title: '时长',
align: "center",
dataIndex: 'duration'
},
{
title: '大小(MB)',
align: "center",
dataIndex: 'size'
},
{
title: '回放类型',
align: "center",
dataIndex: 'videoType',
customRender:({record})=>{
return record.videoType?(record.videoType=='1'?'定时录像':'移动侦测'):'';
},
},
{
title: '错误状态',
align: "center",
dataIndex: 'errorMsg'
},
{
title: '设备序号',
align: "center",
dataIndex: 'videoDevId'
},
{
title: '存储设备ID',
align: "center",
dataIndex: 'storageDevId'
},
{
title: '双摄IPC通道ID',
align: "center",
dataIndex: 'channelId'
},
{
title: '所属NVS的ID',
align: "center",
dataIndex: 'nvsIdInPoolList'
},
];
export const searchRecording: FormSchema[] = [
{
field: 'dataDate',
label: '录像日期',
component: 'DatePicker',
defaultValue: dayjs(new Date()).format('YYYY-MM-DD'),
componentProps: {
//日期格式化,页面上显示的值
format: 'YYYY-MM-DD',
//返回值格式化(绑定值的格式)
valueFormat: 'YYYY-MM-DD',
//是否显示今天按钮
showToday: true,
},
colProps: { span: 6 },
},
// {
// field: 'videoType',
// label: '回放类型',
// component: 'JDictSelectTag',
// componentProps: {
// placeholder: '请选择类型',
// options: [
// { label: '定时录像', value: '1' },
// { label: '移动侦测', value: '2' },
// ],
// },
// colProps: { span: 6 },
// },
];