2025-07-09 15:03:17 +08:00
|
|
|
import type {FormSchemaGetter} from '#/adapter/form';
|
|
|
|
import type {VxeGridProps} from '#/adapter/vxe-table';
|
|
|
|
import {renderDict} from "#/utils/render";
|
|
|
|
import {getDictOptions} from "#/utils/dict";
|
2025-07-09 18:12:28 +08:00
|
|
|
import {h} from "vue";
|
|
|
|
import {Rate} from "ant-design-vue";
|
2025-07-09 10:36:42 +08:00
|
|
|
|
|
|
|
export const querySchema: FormSchemaGetter = () => [
|
|
|
|
{
|
|
|
|
component: 'Input',
|
|
|
|
fieldName: 'orderNo',
|
|
|
|
label: '工单编号',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Input',
|
|
|
|
fieldName: 'orderName',
|
|
|
|
label: '工单名称',
|
|
|
|
},
|
|
|
|
{
|
2025-07-09 15:03:17 +08:00
|
|
|
component: 'Select',
|
2025-07-09 10:36:42 +08:00
|
|
|
componentProps: {
|
2025-07-09 15:03:17 +08:00
|
|
|
options: getDictOptions('wy_gdclzt'),
|
2025-07-09 10:36:42 +08:00
|
|
|
},
|
|
|
|
fieldName: 'status',
|
|
|
|
label: '状态',
|
|
|
|
},
|
2025-08-04 17:06:09 +08:00
|
|
|
{
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {
|
|
|
|
options: getDictOptions('pro_processing_weight'),
|
|
|
|
},
|
|
|
|
fieldName: 'processingWeight',
|
2025-08-21 17:11:47 +08:00
|
|
|
label: '处理优先级',
|
2025-08-04 17:06:09 +08:00
|
|
|
},
|
2025-07-09 10:36:42 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
export const columns: VxeGridProps['columns'] = [
|
2025-07-09 15:03:17 +08:00
|
|
|
{type: 'checkbox', width: 60},
|
2025-07-09 10:36:42 +08:00
|
|
|
{
|
|
|
|
title: '工单编号',
|
|
|
|
field: 'orderNo',
|
2025-07-09 15:03:17 +08:00
|
|
|
width: 180,
|
2025-07-09 10:36:42 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '工单名称',
|
|
|
|
field: 'orderName',
|
2025-07-09 15:03:17 +08:00
|
|
|
minWidth: 180,
|
2025-07-09 10:36:42 +08:00
|
|
|
},
|
2025-07-10 16:13:53 +08:00
|
|
|
{
|
|
|
|
title: '工单类型',
|
|
|
|
field: 'typeName',
|
|
|
|
minWidth: 150,
|
|
|
|
},
|
2025-08-08 16:22:04 +08:00
|
|
|
{
|
|
|
|
title: '上报类型',
|
|
|
|
field: 'reportingType',
|
|
|
|
slots: {
|
|
|
|
default: ({row}) => {
|
|
|
|
return renderDict(row.reportingType, 'wy_gdsblx');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
width: 100,
|
|
|
|
},
|
2025-07-09 10:36:42 +08:00
|
|
|
{
|
2025-07-09 18:12:28 +08:00
|
|
|
title: '派单时间',
|
|
|
|
field: 'dispatchTime',
|
2025-07-09 15:03:17 +08:00
|
|
|
width: 100,
|
2025-07-09 10:36:42 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '状态',
|
|
|
|
field: 'status',
|
2025-07-09 15:03:17 +08:00
|
|
|
slots: {
|
|
|
|
default: ({row}) => {
|
|
|
|
return renderDict(row.status, 'wy_gdclzt');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
width: 100,
|
2025-07-09 10:36:42 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '地址',
|
|
|
|
field: 'location',
|
2025-07-09 15:03:17 +08:00
|
|
|
width: 100,
|
2025-07-09 10:36:42 +08:00
|
|
|
},
|
|
|
|
{
|
2025-08-21 17:11:47 +08:00
|
|
|
title: '处理优先级',
|
2025-07-31 14:35:46 +08:00
|
|
|
field: 'processingWeight',
|
|
|
|
slots: {
|
|
|
|
default: ({row}) => {
|
|
|
|
return renderDict(row.processingWeight, 'pro_processing_weight');
|
|
|
|
},
|
|
|
|
},
|
2025-07-09 15:03:17 +08:00
|
|
|
width: 100,
|
2025-07-09 10:36:42 +08:00
|
|
|
},
|
2025-07-31 14:35:46 +08:00
|
|
|
// {
|
|
|
|
// title: '计划完成时间',
|
|
|
|
// field: 'planCompleTime',
|
|
|
|
// width: 100,
|
|
|
|
// },
|
2025-07-09 10:36:42 +08:00
|
|
|
{
|
|
|
|
title: '完成时间',
|
|
|
|
field: 'compleTime',
|
2025-07-09 15:03:17 +08:00
|
|
|
width: 100,
|
2025-07-09 10:36:42 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '评价',
|
|
|
|
field: 'serviceEvalua',
|
2025-07-09 18:12:28 +08:00
|
|
|
width: 180,
|
2025-07-10 16:13:53 +08:00
|
|
|
slots: {
|
|
|
|
default: ({row}) => {
|
2025-07-09 18:12:28 +08:00
|
|
|
return h(Rate, {
|
|
|
|
value: row.serviceEvalua || 0,
|
|
|
|
disabled: true,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
2025-07-09 10:36:42 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '是否超时',
|
|
|
|
field: 'isTimeOut',
|
2025-07-09 15:03:17 +08:00
|
|
|
width: 100,
|
2025-07-09 18:12:28 +08:00
|
|
|
slots: {
|
|
|
|
default: ({row}) => {
|
2025-07-21 20:41:47 +08:00
|
|
|
return row.isTimeOut ? renderDict(row.isTimeOut, 'wy_sf') : '';
|
2025-07-09 18:12:28 +08:00
|
|
|
},
|
|
|
|
},
|
2025-07-09 10:36:42 +08:00
|
|
|
},
|
2025-07-31 14:35:46 +08:00
|
|
|
{
|
|
|
|
title: '创建时间',
|
|
|
|
field: 'createTime',
|
|
|
|
width: 100,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '备注',
|
|
|
|
field: 'remark',
|
|
|
|
width: 100,
|
|
|
|
},
|
2025-07-09 10:36:42 +08:00
|
|
|
{
|
|
|
|
field: 'action',
|
|
|
|
fixed: 'right',
|
2025-07-09 15:03:17 +08:00
|
|
|
slots: {default: 'action'},
|
2025-07-09 10:36:42 +08:00
|
|
|
title: '操作',
|
2025-07-21 20:41:47 +08:00
|
|
|
width: 300,
|
2025-07-09 10:36:42 +08:00
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export const modalSchema: FormSchemaGetter = () => [
|
|
|
|
{
|
|
|
|
label: 'id',
|
|
|
|
fieldName: 'id',
|
|
|
|
component: 'Input',
|
|
|
|
dependencies: {
|
|
|
|
show: () => false,
|
|
|
|
triggerFields: [''],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '工单名称',
|
|
|
|
fieldName: 'orderName',
|
|
|
|
component: 'Input',
|
|
|
|
rules: 'required',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '工单类型',
|
|
|
|
fieldName: 'type',
|
2025-08-06 14:33:02 +08:00
|
|
|
component: 'TreeSelect',
|
2025-07-09 10:36:42 +08:00
|
|
|
rules: 'selectRequired',
|
|
|
|
},
|
2025-08-04 17:06:09 +08:00
|
|
|
{
|
2025-08-21 17:11:47 +08:00
|
|
|
label: '处理优先级',
|
2025-08-04 17:06:09 +08:00
|
|
|
fieldName: 'processingWeight',
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {
|
|
|
|
options: getDictOptions('pro_processing_weight'),
|
|
|
|
},
|
|
|
|
rules: 'selectRequired',
|
|
|
|
},
|
2025-08-08 16:22:04 +08:00
|
|
|
{
|
|
|
|
label: '上报类型',
|
|
|
|
fieldName: 'reportingType',
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {
|
|
|
|
options: getDictOptions('wy_gdsblx'),
|
|
|
|
},
|
|
|
|
rules: 'selectRequired',
|
|
|
|
},
|
2025-07-09 15:03:17 +08:00
|
|
|
// {
|
|
|
|
// label: '状态',
|
|
|
|
// fieldName: 'status',
|
|
|
|
// component: 'RadioGroup',
|
|
|
|
// componentProps: {
|
|
|
|
// buttonStyle: 'solid',
|
|
|
|
// optionType: 'button',
|
|
|
|
// },
|
|
|
|
// rules: 'selectRequired',
|
|
|
|
// },
|
2025-07-21 20:41:47 +08:00
|
|
|
// {
|
|
|
|
// label: '派单时间',
|
|
|
|
// fieldName: 'dispatchTime',
|
|
|
|
// component: 'DatePicker',
|
|
|
|
// componentProps: {
|
|
|
|
// showTime: true,
|
|
|
|
// format: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
// valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
// disabledDate: disabledDate
|
|
|
|
// },
|
|
|
|
// rules: 'selectRequired',
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// label: '发起人',
|
|
|
|
// fieldName: 'initiatorName',
|
|
|
|
// component: 'ApiSelect',
|
|
|
|
// formItemClass: 'col-span-2',
|
|
|
|
// rules: 'selectRequired',
|
|
|
|
//
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// label: '处理人',
|
|
|
|
// fieldName: 'handler',
|
|
|
|
// component: 'ApiSelect',
|
|
|
|
// formItemClass: 'col-span-2',
|
|
|
|
// rules: 'selectRequired',
|
|
|
|
// },
|
2025-07-09 10:36:42 +08:00
|
|
|
{
|
2025-07-09 15:03:17 +08:00
|
|
|
label: '具体位置',
|
2025-07-09 10:36:42 +08:00
|
|
|
fieldName: 'location',
|
|
|
|
component: 'Input',
|
2025-07-09 15:03:17 +08:00
|
|
|
rules: 'selectRequired',
|
2025-08-08 16:22:04 +08:00
|
|
|
formItemClass:'col-span-2'
|
2025-07-09 10:36:42 +08:00
|
|
|
},
|
2025-07-21 20:41:47 +08:00
|
|
|
// {
|
2025-07-31 14:35:46 +08:00
|
|
|
// label: '计划完成时间',
|
|
|
|
// fieldName: 'planCompleTime',
|
2025-07-21 20:41:47 +08:00
|
|
|
// component: 'DatePicker',
|
|
|
|
// componentProps: {
|
|
|
|
// showTime: true,
|
|
|
|
// format: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
// valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
// },
|
2025-07-31 14:35:46 +08:00
|
|
|
// labelWidth: 110,
|
2025-07-21 20:41:47 +08:00
|
|
|
// rules: 'selectRequired',
|
|
|
|
// },
|
|
|
|
// {
|
2025-07-31 14:35:46 +08:00
|
|
|
// label: '完成时间',
|
|
|
|
// fieldName: 'compleTime',
|
|
|
|
// component: 'DatePicker',
|
|
|
|
// componentProps: {
|
|
|
|
// showTime: true,
|
|
|
|
// format: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
// valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
// },
|
|
|
|
// rules: 'selectRequired',
|
2025-07-21 20:41:47 +08:00
|
|
|
// },
|
2025-07-31 14:35:46 +08:00
|
|
|
{
|
|
|
|
label: '备注',
|
2025-08-04 17:06:09 +08:00
|
|
|
fieldName: 'remark',
|
2025-07-31 14:35:46 +08:00
|
|
|
component: 'Textarea',
|
2025-08-08 16:22:04 +08:00
|
|
|
formItemClass:'col-span-2'
|
2025-07-31 14:35:46 +08:00
|
|
|
},
|
2025-07-21 20:41:47 +08:00
|
|
|
// {
|
|
|
|
// label: '是否超时',
|
|
|
|
// fieldName: 'isTimeOut',
|
|
|
|
// component: 'RadioGroup',
|
|
|
|
// componentProps: {
|
|
|
|
// buttonStyle: 'solid',
|
|
|
|
// options: getDictOptions('wy_sf'),
|
|
|
|
// },
|
|
|
|
// rules: 'selectRequired',
|
|
|
|
// },
|
2025-08-04 17:06:09 +08:00
|
|
|
{
|
|
|
|
label: '工单图片',
|
|
|
|
fieldName: 'orderImgUrl',
|
|
|
|
component: 'ImageUpload',
|
|
|
|
componentProps: {
|
|
|
|
maxCount: 1,
|
|
|
|
},
|
|
|
|
formItemClass: 'col-span-2',
|
|
|
|
},
|
2025-07-21 20:41:47 +08:00
|
|
|
];
|
|
|
|
export const ordersModalSchema: FormSchemaGetter = () => [
|
|
|
|
{
|
|
|
|
label: 'id',
|
|
|
|
fieldName: 'id',
|
|
|
|
component: 'Input',
|
|
|
|
dependencies: {
|
|
|
|
show: () => false,
|
|
|
|
triggerFields: [''],
|
|
|
|
},
|
|
|
|
},
|
2025-07-09 10:36:42 +08:00
|
|
|
{
|
2025-07-21 20:41:47 +08:00
|
|
|
label: '状态',
|
|
|
|
fieldName: 'status',
|
|
|
|
component: 'Select',
|
2025-07-09 10:36:42 +08:00
|
|
|
componentProps: {
|
2025-07-21 20:41:47 +08:00
|
|
|
options: getDictOptions('wy_gdclzt'),
|
2025-07-09 10:36:42 +08:00
|
|
|
},
|
2025-07-09 15:03:17 +08:00
|
|
|
rules: 'selectRequired',
|
2025-07-21 20:41:47 +08:00
|
|
|
disabled: true
|
2025-07-09 10:36:42 +08:00
|
|
|
},
|
|
|
|
{
|
2025-07-21 20:41:47 +08:00
|
|
|
label: '处理人',
|
|
|
|
fieldName: 'handler',
|
|
|
|
component: 'ApiSelect',
|
|
|
|
formItemClass: 'col-span-2',
|
2025-07-09 15:03:17 +08:00
|
|
|
rules: 'selectRequired',
|
2025-07-21 20:41:47 +08:00
|
|
|
dependencies: {
|
|
|
|
disabled: (formValue) =>formValue.status === '2' ,
|
|
|
|
triggerFields: ['status'],
|
|
|
|
},
|
2025-07-09 10:36:42 +08:00
|
|
|
},
|
2025-07-21 20:41:47 +08:00
|
|
|
]
|