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

185 lines
3.1 KiB

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