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' }, // { // 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: '护理单元', // align: "center", // dataIndex: 'nuId_dictText', // }, // { // title: '护理单元', // align: "center", // dataIndex: 'nuName' // }, { title: 'FTP地址', align: "center", dataIndex: 'ftpIp' }, { title: 'FTP端口', align: "center", dataIndex: 'ftpPort' }, { title: 'FTP用户', align: "center", dataIndex: 'ftpUsername' }, { title: 'FTP密码', align: "center", dataIndex: 'ftpPassword' }, { title: 'FTP上传路径', align: "center", dataIndex: 'ftpUploadpath' }, ]; 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 }, // { // 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: '护理单元', // field: 'nuId', // component: 'JSelectNu', // componentProps: { // rowKey: 'nuId', // labelKey: 'nuName', // selectType: true, // }, // }, { label: 'FTP地址', field: 'ftpIp', component: 'Input', }, { label: 'FTP端口', field: 'ftpPort', component: 'Input', }, { label: 'FTP用户', field: 'ftpUsername', component: 'Input', }, { label: 'FTP密码', field: 'ftpPassword', component: 'Input', }, { label: 'FTP上传路径', field: 'ftpUploadpath', 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 }, // }, ];