数字孪生Web 后台dt( digital twin)2.0版本 统一命名格式
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

265 lines
5.3 KiB

import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
// {
// title: '设备Id',
// align: 'center',
// dataIndex: 'deviceId',
// width: 200,
// },
{
title: '设备名称',
align: 'center',
dataIndex: 'deviceId_dictText',
},
// {
// title: '设备类型',
// align: 'center',
// dataIndex: 'deviceType_dictText',
// sorter: true,
// width: 150,
// },
// {
// title: '申请人',
// align: 'center',
// dataIndex: 'createBy',
// width: 120,
// },
{
title: '申请时间',
align: 'center',
dataIndex: 'createTime',
sorter: true,
},
// {
// title: '审批人',
// align: 'center',
// dataIndex: 'auditManid',
// width: 120,
// },
{
title: '审核状态',
align: 'center',
dataIndex: 'status_dictText',
sorter: true,
width: 140,
},
{
title: '入网时间',
align: 'center',
dataIndex: 'importDate',
sorter: true,
},
// {
// title: '许可证编号',
// align: 'center',
// dataIndex: 'licenseNo',
// },
// {
// title: '审批时间',
// align: 'center',
// dataIndex: 'auditDate',
// sorter: true,
// },
// {
// title: '备注',
// align: 'center',
// dataIndex: 'remark',
// },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: '设备名称',
field: 'deviceName',
component: 'Input',
colProps: { span: 6 },
},
{
label: '入网时间',
field: 'importDate',
component: 'RangePicker',
componentProps: {
showTime: true,
},
colProps: { span: 6 },
},
{
label: '审批时间',
field: 'auditDate',
component: 'RangePicker',
componentProps: {
showTime: true,
},
colProps: { span: 6 },
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '设备Id',
field: 'deviceId',
component: 'Input',
dynamicRules: ({ model, schema }) => {
return [{ required: true, message: '请输入设备Id!' }];
},
},
{
label: '设备名称',
field: 'deviceName',
component: 'Input',
dynamicRules: ({ model, schema }) => {
return [{ required: true, message: '请输入设备名称!' }];
},
},
{
label: '设备类型',
field: 'deviceType',
component: 'InputNumber',
dynamicRules: ({ model, schema }) => {
return [{ required: true, message: '请输入设备类型!' }];
},
},
{
label: '许可证编号',
field: 'licenseNo',
component: 'Input',
dynamicRules: ({ model, schema }) => {
return [{ required: true, message: '请输入许可证编号!' }];
},
},
{
label: '入网时间',
field: 'importDate',
component: 'DatePicker',
componentProps: {
showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
dynamicRules: ({ model, schema }) => {
return [{ required: true, message: '请输入入网时间!' }];
},
},
{
label: '状态',
field: 'status',
component: 'InputNumber',
},
{
label: '审批人',
field: 'auditManid',
component: 'Input',
dynamicRules: ({ model, schema }) => {
return [{ required: true, message: '请输入审批人!' }];
},
},
{
label: '审批时间',
field: 'auditDate',
component: 'DatePicker',
componentProps: {
showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
dynamicRules: ({ model, schema }) => {
return [{ required: true, message: '请输入审批时间!' }];
},
},
{
label: '备注',
field: 'remark',
component: 'Input',
},
// TODO 主键隐藏字段,目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];
//申请列表数据
export const applyColumns: BasicColumn[] = [
// {
// title: '设备Id',
// align: 'center',
// dataIndex: 'deviceId',
// },
{
title: '设备名称',
align: 'center',
dataIndex: 'deviceId_dictText',
},
{
title: '申请人',
align: 'center',
dataIndex: 'createBy',
width: 120,
},
{
title: '申请时间',
align: 'center',
dataIndex: 'createTime',
sorter: true,
},
// {
// title: '设备类型',
// align: 'center',
// dataIndex: 'deviceType_dictText',
// sorter: true,
// width: 120,
// },
{
title: '审核状态',
align: 'center',
dataIndex: 'status_dictText',
sorter: true,
width: 140,
},
{
title: '许可证编号',
align: 'center',
dataIndex: 'licenseNo',
},
{
title: '入网时间',
align: 'center',
dataIndex: 'importDate',
sorter: true,
},
// {
// title: '备注',
// align: 'center',
// dataIndex: 'remark',
// },
// {
// title: '申请人',
// align: 'center',
// dataIndex: 'createBy',
// },
// {
// title: '更新时间',
// align: 'center',
// dataIndex: 'updateTime',
// sorter: true,
// },
// {
// title: '审批人',
// align: "center",
// dataIndex: 'auditManid'
// },
// {
// title: '审批时间',
// align: "center",
// dataIndex: 'auditDate',
// sorter: true,
// },
];