feat:简化 ApiSelect 的 api 写法~
This commit is contained in:
@@ -34,7 +34,6 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'processInstanceName',
|
||||
title: '流程名称',
|
||||
minWidth: 200,
|
||||
fixed: 'left',
|
||||
},
|
||||
{
|
||||
field: 'summary',
|
||||
@@ -62,12 +61,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
{
|
||||
field: 'activityName',
|
||||
title: '抄送节点',
|
||||
minWidth: 180,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
field: 'createUser.nickname',
|
||||
title: '抄送人',
|
||||
minWidth: 180,
|
||||
minWidth: 120,
|
||||
formatter: ({ cellValue }) => {
|
||||
return cellValue || '-';
|
||||
},
|
||||
|
||||
@@ -5,6 +5,7 @@ import { DICT_TYPE } from '@vben/constants';
|
||||
import { getDictOptions } from '@vben/hooks';
|
||||
|
||||
import { getCategorySimpleList } from '#/api/bpm/category';
|
||||
import { getSimpleProcessDefinitionList } from '#/api/bpm/definition';
|
||||
import { getRangePickerDefaultProps } from '#/utils';
|
||||
|
||||
/** 列表的搜索表单 */
|
||||
@@ -19,7 +20,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
// TODO @AI:是不是直接 import 下,不要动态;
|
||||
{
|
||||
fieldName: 'processDefinitionKey',
|
||||
label: '所属流程',
|
||||
@@ -27,12 +27,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
componentProps: {
|
||||
placeholder: '请选择流程定义',
|
||||
allowClear: true,
|
||||
api: async () => {
|
||||
const { getSimpleProcessDefinitionList } = await import(
|
||||
'#/api/bpm/definition'
|
||||
);
|
||||
return await getSimpleProcessDefinitionList();
|
||||
},
|
||||
api: getSimpleProcessDefinitionList,
|
||||
labelField: 'name',
|
||||
valueField: 'key',
|
||||
},
|
||||
@@ -44,7 +39,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
componentProps: {
|
||||
placeholder: '请输入流程分类',
|
||||
allowClear: true,
|
||||
api: () => getCategorySimpleList(),
|
||||
api: getCategorySimpleList,
|
||||
labelField: 'name',
|
||||
valueField: 'code',
|
||||
},
|
||||
@@ -78,7 +73,6 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'processInstance.name',
|
||||
title: '流程',
|
||||
minWidth: 200,
|
||||
fixed: 'left',
|
||||
},
|
||||
{
|
||||
field: 'processInstance.summary',
|
||||
|
||||
@@ -95,8 +95,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
{
|
||||
label: '撤回',
|
||||
type: 'link',
|
||||
icon: ACTION_ICON.EDIT,
|
||||
color: 'warning',
|
||||
danger: true,
|
||||
icon: ACTION_ICON.DELETE,
|
||||
popConfirm: {
|
||||
title: '确定要撤回该任务吗?',
|
||||
confirm: handleWithdraw.bind(null, row),
|
||||
|
||||
@@ -36,7 +36,6 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'processInstance.name',
|
||||
title: '流程',
|
||||
minWidth: 200,
|
||||
fixed: 'left',
|
||||
},
|
||||
{
|
||||
field: 'processInstance.startUser.nickname',
|
||||
|
||||
@@ -5,6 +5,7 @@ import { DICT_TYPE } from '@vben/constants';
|
||||
import { getDictOptions } from '@vben/hooks';
|
||||
|
||||
import { getCategorySimpleList } from '#/api/bpm/category';
|
||||
import { getSimpleProcessDefinitionList } from '#/api/bpm/definition';
|
||||
import { getRangePickerDefaultProps } from '#/utils';
|
||||
|
||||
/** 列表的搜索表单 */
|
||||
@@ -19,7 +20,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
// TODO @AI:是不是直接 import 下,不要动态;
|
||||
{
|
||||
fieldName: 'processDefinitionKey',
|
||||
label: '所属流程',
|
||||
@@ -27,12 +27,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
componentProps: {
|
||||
placeholder: '请选择流程定义',
|
||||
allowClear: true,
|
||||
api: async () => {
|
||||
const { getSimpleProcessDefinitionList } = await import(
|
||||
'#/api/bpm/definition'
|
||||
);
|
||||
return await getSimpleProcessDefinitionList();
|
||||
},
|
||||
api: getSimpleProcessDefinitionList,
|
||||
labelField: 'name',
|
||||
valueField: 'key',
|
||||
},
|
||||
@@ -44,7 +39,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
componentProps: {
|
||||
placeholder: '请输入流程分类',
|
||||
allowClear: true,
|
||||
api: () => getCategorySimpleList(),
|
||||
api: getCategorySimpleList,
|
||||
labelField: 'name',
|
||||
valueField: 'code',
|
||||
},
|
||||
@@ -81,7 +76,6 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'processInstance.name',
|
||||
title: '流程',
|
||||
minWidth: 200,
|
||||
fixed: 'left',
|
||||
},
|
||||
{
|
||||
field: 'processInstance.summary',
|
||||
|
||||
Reference in New Issue
Block a user