264 lines
4.9 KiB
TypeScript
264 lines
4.9 KiB
TypeScript
|
import type { FormSchemaGetter } from '#/adapter/form';
|
||
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||
|
|
||
|
|
||
|
export const querySchema: FormSchemaGetter = () => [
|
||
|
{
|
||
|
component: 'Input',
|
||
|
fieldName: 'orderNo',
|
||
|
label: '工单编号',
|
||
|
},
|
||
|
{
|
||
|
component: 'Input',
|
||
|
fieldName: 'orderName',
|
||
|
label: '工单名称',
|
||
|
},
|
||
|
{
|
||
|
component: 'Select',
|
||
|
componentProps: {
|
||
|
},
|
||
|
fieldName: 'type',
|
||
|
label: '工单类型',
|
||
|
},
|
||
|
{
|
||
|
component: 'RadioGroup',
|
||
|
componentProps: {
|
||
|
buttonStyle: 'solid',
|
||
|
optionType: 'button',
|
||
|
},
|
||
|
fieldName: 'status',
|
||
|
label: '状态',
|
||
|
},
|
||
|
{
|
||
|
component: 'DatePicker',
|
||
|
componentProps: {
|
||
|
showTime: true,
|
||
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||
|
},
|
||
|
fieldName: 'dispatchTime',
|
||
|
label: '派单时间',
|
||
|
},
|
||
|
{
|
||
|
component: 'Input',
|
||
|
fieldName: 'initiatorName',
|
||
|
label: '发起人姓名',
|
||
|
},
|
||
|
{
|
||
|
component: 'Input',
|
||
|
fieldName: 'initiatorPhone',
|
||
|
label: '发起人手机号',
|
||
|
},
|
||
|
{
|
||
|
component: 'Input',
|
||
|
fieldName: 'handler',
|
||
|
label: '处理人姓名',
|
||
|
},
|
||
|
{
|
||
|
component: 'Input',
|
||
|
fieldName: 'location',
|
||
|
label: '地址',
|
||
|
},
|
||
|
{
|
||
|
component: 'DatePicker',
|
||
|
componentProps: {
|
||
|
showTime: true,
|
||
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||
|
},
|
||
|
fieldName: 'planCompleTime',
|
||
|
label: '计划完成时间',
|
||
|
},
|
||
|
{
|
||
|
component: 'DatePicker',
|
||
|
componentProps: {
|
||
|
showTime: true,
|
||
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||
|
},
|
||
|
fieldName: 'compleTime',
|
||
|
label: '完成时间',
|
||
|
},
|
||
|
{
|
||
|
component: 'Input',
|
||
|
fieldName: 'serviceEvalua',
|
||
|
label: '评价',
|
||
|
},
|
||
|
{
|
||
|
component: 'Input',
|
||
|
fieldName: 'isTimeOut',
|
||
|
label: '是否超时',
|
||
|
},
|
||
|
];
|
||
|
|
||
|
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||
|
// export const columns: () => VxeGridProps['columns'] = () => [
|
||
|
export const columns: VxeGridProps['columns'] = [
|
||
|
{ type: 'checkbox', width: 60 },
|
||
|
{
|
||
|
title: 'id',
|
||
|
field: 'id',
|
||
|
},
|
||
|
{
|
||
|
title: '工单编号',
|
||
|
field: 'orderNo',
|
||
|
},
|
||
|
{
|
||
|
title: '工单名称',
|
||
|
field: 'orderName',
|
||
|
},
|
||
|
{
|
||
|
title: '工单类型',
|
||
|
field: 'type',
|
||
|
},
|
||
|
{
|
||
|
title: '状态',
|
||
|
field: 'status',
|
||
|
},
|
||
|
{
|
||
|
title: '派单时间',
|
||
|
field: 'dispatchTime',
|
||
|
},
|
||
|
{
|
||
|
title: '发起人姓名',
|
||
|
field: 'initiatorName',
|
||
|
},
|
||
|
{
|
||
|
title: '发起人手机号',
|
||
|
field: 'initiatorPhone',
|
||
|
},
|
||
|
{
|
||
|
title: '处理人姓名',
|
||
|
field: 'handler',
|
||
|
},
|
||
|
{
|
||
|
title: '地址',
|
||
|
field: 'location',
|
||
|
},
|
||
|
{
|
||
|
title: '计划完成时间',
|
||
|
field: 'planCompleTime',
|
||
|
},
|
||
|
{
|
||
|
title: '完成时间',
|
||
|
field: 'compleTime',
|
||
|
},
|
||
|
{
|
||
|
title: '评价',
|
||
|
field: 'serviceEvalua',
|
||
|
},
|
||
|
{
|
||
|
title: '是否超时',
|
||
|
field: 'isTimeOut',
|
||
|
},
|
||
|
{
|
||
|
field: 'action',
|
||
|
fixed: 'right',
|
||
|
slots: { default: 'action' },
|
||
|
title: '操作',
|
||
|
width: 180,
|
||
|
},
|
||
|
];
|
||
|
|
||
|
export const modalSchema: FormSchemaGetter = () => [
|
||
|
{
|
||
|
label: 'id',
|
||
|
fieldName: 'id',
|
||
|
component: 'Input',
|
||
|
dependencies: {
|
||
|
show: () => false,
|
||
|
triggerFields: [''],
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '工单编号',
|
||
|
fieldName: 'orderNo',
|
||
|
component: 'Input',
|
||
|
},
|
||
|
{
|
||
|
label: '工单名称',
|
||
|
fieldName: 'orderName',
|
||
|
component: 'Input',
|
||
|
rules: 'required',
|
||
|
},
|
||
|
{
|
||
|
label: '工单类型',
|
||
|
fieldName: 'type',
|
||
|
component: 'Select',
|
||
|
componentProps: {
|
||
|
},
|
||
|
rules: 'selectRequired',
|
||
|
},
|
||
|
{
|
||
|
label: '状态',
|
||
|
fieldName: 'status',
|
||
|
component: 'RadioGroup',
|
||
|
componentProps: {
|
||
|
buttonStyle: 'solid',
|
||
|
optionType: 'button',
|
||
|
},
|
||
|
rules: 'selectRequired',
|
||
|
},
|
||
|
{
|
||
|
label: '派单时间',
|
||
|
fieldName: 'dispatchTime',
|
||
|
component: 'DatePicker',
|
||
|
componentProps: {
|
||
|
showTime: true,
|
||
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||
|
},
|
||
|
rules: 'required',
|
||
|
},
|
||
|
{
|
||
|
label: '发起人姓名',
|
||
|
fieldName: 'initiatorName',
|
||
|
component: 'Input',
|
||
|
},
|
||
|
{
|
||
|
label: '发起人手机号',
|
||
|
fieldName: 'initiatorPhone',
|
||
|
component: 'Input',
|
||
|
},
|
||
|
{
|
||
|
label: '处理人姓名',
|
||
|
fieldName: 'handler',
|
||
|
component: 'Input',
|
||
|
},
|
||
|
{
|
||
|
label: '地址',
|
||
|
fieldName: 'location',
|
||
|
component: 'Input',
|
||
|
},
|
||
|
{
|
||
|
label: '计划完成时间',
|
||
|
fieldName: 'planCompleTime',
|
||
|
component: 'DatePicker',
|
||
|
componentProps: {
|
||
|
showTime: true,
|
||
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '完成时间',
|
||
|
fieldName: 'compleTime',
|
||
|
component: 'DatePicker',
|
||
|
componentProps: {
|
||
|
showTime: true,
|
||
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '评价',
|
||
|
fieldName: 'serviceEvalua',
|
||
|
component: 'Input',
|
||
|
},
|
||
|
{
|
||
|
label: '是否超时',
|
||
|
fieldName: 'isTimeOut',
|
||
|
component: 'Input',
|
||
|
},
|
||
|
];
|