106 lines
1.9 KiB
TypeScript
106 lines
1.9 KiB
TypeScript
|
import type {FormSchemaGetter} from '#/adapter/form';
|
||
|
import type {VxeGridProps} from '#/adapter/vxe-table';
|
||
|
import {renderDict} from "#/utils/render";
|
||
|
import {h} from "vue";
|
||
|
import {Rate} from "ant-design-vue";
|
||
|
|
||
|
export const querySchema: FormSchemaGetter = () => [
|
||
|
{
|
||
|
component: 'Input',
|
||
|
fieldName: 'orderNo',
|
||
|
label: '工单编号',
|
||
|
},
|
||
|
{
|
||
|
component: 'Input',
|
||
|
fieldName: 'orderName',
|
||
|
label: '工单名称',
|
||
|
},
|
||
|
// {
|
||
|
// component: 'Select',
|
||
|
// componentProps: {
|
||
|
// options: getDictOptions('wy_gdclzt'),
|
||
|
// },
|
||
|
// fieldName: 'status',
|
||
|
// label: '状态',
|
||
|
// },
|
||
|
];
|
||
|
|
||
|
export const columns: VxeGridProps['columns'] = [
|
||
|
{
|
||
|
title: '工单编号',
|
||
|
field: 'orderNo',
|
||
|
width: 200,
|
||
|
},
|
||
|
{
|
||
|
title: '工单名称',
|
||
|
field: 'orderName',
|
||
|
minWidth: 180,
|
||
|
},
|
||
|
{
|
||
|
title: '工单类型',
|
||
|
field: 'typeName',
|
||
|
minWidth: 150,
|
||
|
},
|
||
|
{
|
||
|
title: '派单时间',
|
||
|
field: 'dispatchTime',
|
||
|
width: 100,
|
||
|
},
|
||
|
{
|
||
|
title: '状态',
|
||
|
field: 'status',
|
||
|
slots: {
|
||
|
default: ({row}) => {
|
||
|
return renderDict(row.status, 'wy_gdclzt');
|
||
|
},
|
||
|
},
|
||
|
width: 100,
|
||
|
},
|
||
|
{
|
||
|
title: '地址',
|
||
|
field: 'location',
|
||
|
width: 100,
|
||
|
},
|
||
|
{
|
||
|
title: '计划完成时间',
|
||
|
field: 'planCompleTime',
|
||
|
width: 100,
|
||
|
},
|
||
|
{
|
||
|
title: '完成时间',
|
||
|
field: 'compleTime',
|
||
|
width: 100,
|
||
|
},
|
||
|
{
|
||
|
title: '评价',
|
||
|
field: 'serviceEvalua',
|
||
|
width: 180,
|
||
|
slots: {
|
||
|
default: ({row}) => {
|
||
|
return h(Rate, {
|
||
|
value: row.serviceEvalua || 0,
|
||
|
disabled: true,
|
||
|
});
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
title: '是否超时',
|
||
|
field: 'isTimeOut',
|
||
|
width: 100,
|
||
|
slots: {
|
||
|
default: ({row}) => {
|
||
|
return row.isTimeOut ? renderDict(row.isTimeOut, 'wy_sf') : '';
|
||
|
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
field: 'action',
|
||
|
fixed: 'right',
|
||
|
slots: {default: 'action'},
|
||
|
title: '操作',
|
||
|
width: 120,
|
||
|
},
|
||
|
];
|