169 lines
3.4 KiB
TypeScript
169 lines
3.4 KiB
TypeScript
|
import type { FormSchemaGetter } from '#/adapter/form';
|
||
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||
|
import {getDictOptions} from "#/utils/dict";
|
||
|
import {renderDict} from "#/utils/render";
|
||
|
|
||
|
|
||
|
export const querySchema: FormSchemaGetter = () => [
|
||
|
{
|
||
|
component: 'Select',
|
||
|
componentProps: {
|
||
|
options:getDictOptions('wy_yjfklx')
|
||
|
},
|
||
|
fieldName: 'feedbackType',
|
||
|
label: '反馈类型',
|
||
|
},
|
||
|
{
|
||
|
component: 'Select',
|
||
|
componentProps: {
|
||
|
options:getDictOptions('wy_yjclzt')
|
||
|
},
|
||
|
fieldName: 'status',
|
||
|
label: '处理状态',
|
||
|
},
|
||
|
];
|
||
|
|
||
|
|
||
|
export const columns: VxeGridProps['columns'] = [
|
||
|
{ type: 'checkbox', width: 60 },
|
||
|
{
|
||
|
title: '反馈类型',
|
||
|
field: 'feedbackType',
|
||
|
slots:{
|
||
|
default: ({row})=>{
|
||
|
return renderDict(row.feedbackType,'wy_yjfklx')
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
title: '反馈人',
|
||
|
field: 'feedbackPersion',
|
||
|
},
|
||
|
{
|
||
|
title: '反馈人电话',
|
||
|
field: 'feedbackPersionPhone',
|
||
|
},
|
||
|
{
|
||
|
title: '反馈内容',
|
||
|
field: 'feedbackContent',
|
||
|
},
|
||
|
{
|
||
|
title: '反馈位置',
|
||
|
field: 'feedbackLocation',
|
||
|
},
|
||
|
{
|
||
|
title: '反馈图片',
|
||
|
field: 'feedbackImg',
|
||
|
},
|
||
|
{
|
||
|
title: '是否转至工单',
|
||
|
field: 'isWorkOrder',
|
||
|
slots:{
|
||
|
default: ({row})=>{
|
||
|
return renderDict(row.isWorkOrder,'wy_sf')
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
title: '处理状态',
|
||
|
field: 'status',
|
||
|
slots:{
|
||
|
default: ({row})=>{
|
||
|
return renderDict(row.status,'wy_yjclzt')
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
title: '客服电话',
|
||
|
field: 'serviceName',
|
||
|
},
|
||
|
{
|
||
|
field: 'action',
|
||
|
fixed: 'right',
|
||
|
slots: { default: 'action' },
|
||
|
title: '操作',
|
||
|
width: 180,
|
||
|
},
|
||
|
];
|
||
|
|
||
|
export const modalSchema: FormSchemaGetter = () => [
|
||
|
{
|
||
|
label: '主键',
|
||
|
fieldName: 'id',
|
||
|
component: 'Input',
|
||
|
dependencies: {
|
||
|
show: () => false,
|
||
|
triggerFields: [''],
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '反馈类型',
|
||
|
fieldName: 'feedbackType',
|
||
|
component: 'Select',
|
||
|
componentProps: {
|
||
|
options:getDictOptions('wy_yjfklx')
|
||
|
},
|
||
|
rules: 'selectRequired',
|
||
|
},
|
||
|
{
|
||
|
label: '反馈人',
|
||
|
fieldName: 'feedbackPersion',
|
||
|
component: 'Input',
|
||
|
rules: 'required',
|
||
|
},
|
||
|
{
|
||
|
label: '反馈人电话',
|
||
|
fieldName: 'feedbackPersionPhone',
|
||
|
component: 'Input',
|
||
|
rules: 'required',
|
||
|
},
|
||
|
{
|
||
|
label: '反馈内容',
|
||
|
fieldName: 'feedbackContent',
|
||
|
component: 'Textarea',
|
||
|
rules: 'required',
|
||
|
formItemClass:'col-span-2'
|
||
|
},
|
||
|
{
|
||
|
label: '反馈位置',
|
||
|
fieldName: 'feedbackLocation',
|
||
|
component: 'Input',
|
||
|
rules: 'required',
|
||
|
formItemClass:'col-span-2'
|
||
|
},
|
||
|
{
|
||
|
label: '反馈图片',
|
||
|
fieldName: 'feedbackImg',
|
||
|
component: 'ImageUpload',
|
||
|
componentProps: {
|
||
|
// accept: 'image/*', // 可选拓展名或者mime类型 ,拼接
|
||
|
// maxCount: 1, // 最大上传文件数 默认为1 为1会绑定为string而非string[]类型
|
||
|
},
|
||
|
rules: 'required',
|
||
|
formItemClass:'col-span-2'
|
||
|
},
|
||
|
{
|
||
|
label: '转至工单',
|
||
|
fieldName: 'isWorkOrder',
|
||
|
component: 'RadioGroup',
|
||
|
componentProps: {
|
||
|
buttonStyle: 'solid',
|
||
|
options: getDictOptions('wy_sf'),
|
||
|
},
|
||
|
defaultValue:'0'
|
||
|
},
|
||
|
{
|
||
|
label: '处理状态',
|
||
|
fieldName: 'status',
|
||
|
component: 'Select',
|
||
|
componentProps: {
|
||
|
options: getDictOptions('wy_yjclzt')
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '客服电话',
|
||
|
fieldName: 'serviceName',
|
||
|
component: 'Input',
|
||
|
},
|
||
|
];
|