运维管理平台前端
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.

94 lines
1.6 KiB

4 months ago
import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
export const formSchemas: FormSchema[] = [
{
field: 'projectName',
label: '项目名称',
component: 'Select',
componentProps: {
options: [
{
value: '1',
label: '2323',
},
{
value: '2',
label: '2323',
},
{
value: '3',
label: '2323',
},
],
},
},
{
4 months ago
label: '编号',
4 months ago
field: 'id',
4 months ago
component: 'Input',
4 months ago
componentProps: {
4 months ago
placeholder: '输入编号',
4 months ago
},
},
{
4 months ago
field: 'fixRange',
label: '报修范围',
4 months ago
component: 'RangePicker',
},
4 months ago
{
label: '地址',
field: 'location',
component: 'Input',
componentProps: {
placeholder: '输入天数',
},
},
4 months ago
];
4 months ago
//列表展示
const responseLevelOptions = [
{
value: 0,
label: '常规',
},
4 months ago
{
4 months ago
value: 1,
label: '紧急',
4 months ago
},
{
4 months ago
value: 2,
label: '特级',
4 months ago
},
4 months ago
];
export const columns: BasicColumn[] = [
4 months ago
{
4 months ago
title: '编号',
4 months ago
dataIndex: 'id',
4 months ago
},
{
title: '报修时间',
4 months ago
dataIndex: 'repairTime',
4 months ago
},
{
4 months ago
title: '响应级别',
dataIndex: 'responseLevel',
customRender({ text }) {
return responseLevelOptions.find((i) => {
return i.value == text;
})?.label;
},
4 months ago
},
{
4 months ago
title: '故障描述',
dataIndex: 'faultDescription',
4 months ago
},
{
4 months ago
title: '故障地点',
dataIndex: 'faultLocation',
4 months ago
},
{
4 months ago
title: '当前状态',
dataIndex: 'status',
4 months ago
},
];