feat: 重构流程定义和流程实例模块,更新API命名,增强用户选择弹窗功能,支持多用户选择,优化流程实例创建界面。
feat: 完善流程定义模块、完善流程实例模块 feat: 完善OA请假模块 feat: 完善审批中心、发起流程、查看流程、工作流整体进度 40%
This commit is contained in:
269
apps/web-antd/src/views/bpm/oa/leave/create.vue
Normal file
269
apps/web-antd/src/views/bpm/oa/leave/create.vue
Normal file
@@ -0,0 +1,269 @@
|
||||
<script lang="ts" setup>
|
||||
import type { BpmOALeaveApi } from '#/api/bpm/oa/leave';
|
||||
import type { BpmProcessInstanceApi } from '#/api/bpm/processInstance';
|
||||
|
||||
import { computed, onMounted, ref, watch } from 'vue';
|
||||
|
||||
import { confirm, Page, useVbenForm } from '@vben/common-ui';
|
||||
import { IconifyIcon } from '@vben/icons';
|
||||
|
||||
import { Button, Card, message, Space } from 'ant-design-vue';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import { getProcessDefinition } from '#/api/bpm/definition';
|
||||
import { createLeave, updateLeave } from '#/api/bpm/oa/leave';
|
||||
import { getApprovalDetail as getApprovalDetailApi } from '#/api/bpm/processInstance';
|
||||
import { $t } from '#/locales';
|
||||
import { router } from '#/router';
|
||||
import { BpmCandidateStrategyEnum, BpmNodeIdEnum } from '#/utils';
|
||||
import ProcessInstanceTimeline from '#/views/bpm/processInstance/detail/modules/time-line.vue';
|
||||
|
||||
import { useFormSchema } from './data';
|
||||
|
||||
const formLoading = ref(false); // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
|
||||
// 审批相关:变量
|
||||
const processDefineKey = 'oa_leave'; // 流程定义 Key
|
||||
const startUserSelectTasks = ref<any>([]); // 发起人需要选择审批人的用户任务列表
|
||||
const startUserSelectAssignees = ref({}); // 发起人选择审批人的数据
|
||||
const tempStartUserSelectAssignees = ref({}); // 历史发起人选择审批人的数据,用于每次表单变更时,临时保存
|
||||
const activityNodes = ref<BpmProcessInstanceApi.ApprovalNodeInfo[]>([]); // 审批节点信息
|
||||
const processDefinitionId = ref('');
|
||||
|
||||
const formData = ref<BpmOALeaveApi.LeaveVO>();
|
||||
const getTitle = computed(() => {
|
||||
return formData.value?.id
|
||||
? $t('ui.actionTitle.edit', ['请假'])
|
||||
: $t('ui.actionTitle.create', ['请假']);
|
||||
});
|
||||
|
||||
const [Form, formApi] = useVbenForm({
|
||||
commonConfig: {
|
||||
componentProps: {
|
||||
class: 'w-full',
|
||||
},
|
||||
formItemClass: 'col-span-2',
|
||||
labelWidth: 100,
|
||||
},
|
||||
layout: 'horizontal',
|
||||
schema: useFormSchema(),
|
||||
showDefaultActions: false,
|
||||
});
|
||||
|
||||
/** 提交申请 */
|
||||
async function onSubmit() {
|
||||
const { valid } = await formApi.validate();
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 1.2 审批相关:校验指定审批人
|
||||
if (startUserSelectTasks.value?.length > 0) {
|
||||
for (const userTask of startUserSelectTasks.value) {
|
||||
if (
|
||||
Array.isArray(startUserSelectAssignees.value[userTask.id]) &&
|
||||
startUserSelectAssignees.value[userTask.id].length === 0
|
||||
) {
|
||||
return message.warning(`请选择${userTask.name}的审批人`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
const data = (await formApi.getValues()) as BpmOALeaveApi.LeaveVO;
|
||||
|
||||
// 审批相关:设置指定审批人
|
||||
if (startUserSelectTasks.value?.length > 0) {
|
||||
data.startUserSelectAssignees = startUserSelectAssignees.value;
|
||||
}
|
||||
|
||||
// 格式化开始时间和结束时间的值
|
||||
const submitData: BpmOALeaveApi.LeaveVO = {
|
||||
...data,
|
||||
startTime: Number(data.startTime),
|
||||
endTime: Number(data.endTime),
|
||||
};
|
||||
|
||||
try {
|
||||
formLoading.value = true;
|
||||
await (formData.value?.id
|
||||
? updateLeave(submitData)
|
||||
: createLeave(submitData));
|
||||
// 关闭并提示
|
||||
message.success({
|
||||
content: $t('ui.actionMessage.operationSuccess'),
|
||||
key: 'action_process_msg',
|
||||
});
|
||||
|
||||
router.push({
|
||||
name: 'BpmOALeaveList',
|
||||
});
|
||||
} catch (error: any) {
|
||||
message.error(error.message);
|
||||
} finally {
|
||||
formLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
/** 保存草稿 */
|
||||
async function onDraft() {
|
||||
const { valid } = await formApi.validate();
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const data = (await formApi.getValues()) as BpmOALeaveApi.LeaveVO;
|
||||
|
||||
// 格式化开始时间和结束时间的值
|
||||
const submitData: BpmOALeaveApi.LeaveVO = {
|
||||
...data,
|
||||
startTime: Number(data.startTime),
|
||||
endTime: Number(data.endTime),
|
||||
};
|
||||
|
||||
try {
|
||||
formLoading.value = true;
|
||||
await (formData.value?.id
|
||||
? updateLeave(submitData)
|
||||
: createLeave(submitData));
|
||||
// 关闭并提示
|
||||
message.success({
|
||||
content: '保存草稿成功',
|
||||
});
|
||||
} finally {
|
||||
formLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
/** 返回上一页 */
|
||||
function onBack() {
|
||||
confirm({
|
||||
content: '确定要返回上一页吗?请先保存您填写的信息!',
|
||||
icon: 'warning',
|
||||
beforeClose({ isConfirm }) {
|
||||
if (isConfirm) {
|
||||
router.back();
|
||||
}
|
||||
return Promise.resolve(true);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// ============================== 审核流程相关 ==============================
|
||||
|
||||
/** 审批相关:获取审批详情 */
|
||||
const getApprovalDetail = async () => {
|
||||
try {
|
||||
const data = await getApprovalDetailApi({
|
||||
processDefinitionId: processDefinitionId.value,
|
||||
// TODO 小北:可以支持 processDefinitionKey 查询
|
||||
activityId: BpmNodeIdEnum.START_USER_NODE_ID,
|
||||
processVariablesStr: JSON.stringify({
|
||||
day: dayjs(formData.value?.startTime).diff(
|
||||
dayjs(formData.value?.endTime),
|
||||
'day',
|
||||
),
|
||||
}), // 解决 GET 无法传递对象的问题,后端 String 再转 JSON
|
||||
});
|
||||
|
||||
if (!data) {
|
||||
message.error('查询不到审批详情信息!');
|
||||
return;
|
||||
}
|
||||
// 获取审批节点,显示 Timeline 的数据
|
||||
activityNodes.value = data.activityNodes;
|
||||
|
||||
// 获取发起人自选的任务
|
||||
startUserSelectTasks.value = data.activityNodes?.filter(
|
||||
(node: BpmProcessInstanceApi.ApprovalNodeInfo) =>
|
||||
BpmCandidateStrategyEnum.START_USER_SELECT === node.candidateStrategy,
|
||||
);
|
||||
// 恢复之前的选择审批人
|
||||
if (startUserSelectTasks.value?.length > 0) {
|
||||
for (const node of startUserSelectTasks.value) {
|
||||
startUserSelectAssignees.value[node.id] =
|
||||
tempStartUserSelectAssignees.value[node.id] &&
|
||||
tempStartUserSelectAssignees.value[node.id].length > 0
|
||||
? tempStartUserSelectAssignees.value[node.id]
|
||||
: [];
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
};
|
||||
/** 审批相关:选择发起人 */
|
||||
const selectUserConfirm = (id: string, userList: any[]) => {
|
||||
startUserSelectAssignees.value[id] = userList?.map((item: any) => item.id);
|
||||
};
|
||||
|
||||
/** 审批相关:预测流程节点会因为输入的参数值而产生新的预测结果值,所以需重新预测一次, formData.value可改成实际业务中的特定字段 */
|
||||
watch(
|
||||
formData.value,
|
||||
(newValue, oldValue) => {
|
||||
if (!oldValue) {
|
||||
return;
|
||||
}
|
||||
if (newValue && Object.keys(newValue).length > 0) {
|
||||
// 记录之前的节点审批人
|
||||
tempStartUserSelectAssignees.value = startUserSelectAssignees.value;
|
||||
startUserSelectAssignees.value = {};
|
||||
// 加载最新的审批详情,主要用于节点预测
|
||||
getApprovalDetail();
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
},
|
||||
);
|
||||
|
||||
// ============================== 生命周期 ==============================
|
||||
onMounted(async () => {
|
||||
const processDefinitionDetail = await getProcessDefinition(
|
||||
undefined,
|
||||
processDefineKey,
|
||||
);
|
||||
|
||||
if (!processDefinitionDetail) {
|
||||
message.error('OA 请假的流程模型未配置,请检查!');
|
||||
return;
|
||||
}
|
||||
|
||||
processDefinitionId.value = processDefinitionDetail.id;
|
||||
startUserSelectTasks.value = processDefinitionDetail.startUserSelectTasks;
|
||||
|
||||
getApprovalDetail();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Page>
|
||||
<div class="w-80vw mx-auto max-w-[920px]">
|
||||
<Card :title="getTitle" class="w-full">
|
||||
<template #extra>
|
||||
<Button type="default" @click="onBack">
|
||||
<IconifyIcon icon="mdi:arrow-left" />
|
||||
返回
|
||||
</Button>
|
||||
</template>
|
||||
|
||||
<Form />
|
||||
</Card>
|
||||
|
||||
<Card title="流程" class="mt-2 w-full">
|
||||
<ProcessInstanceTimeline
|
||||
:activity-nodes="activityNodes"
|
||||
:show-status-icon="false"
|
||||
@select-user-confirm="selectUserConfirm"
|
||||
/>
|
||||
|
||||
<template #actions>
|
||||
<Space warp :size="12" class="w-full px-6">
|
||||
<Button type="primary" @click="onSubmit"> 提交 </Button>
|
||||
<!-- TODO 后端接口暂不支持保存草稿 (即仅保存数据,不触发流程)-->
|
||||
<!-- <Button type="default" @click="onDraft"> 保存草稿 </Button> -->
|
||||
</Space>
|
||||
</template>
|
||||
</Card>
|
||||
</div>
|
||||
</Page>
|
||||
</template>
|
||||
200
apps/web-antd/src/views/bpm/oa/leave/data.ts
Normal file
200
apps/web-antd/src/views/bpm/oa/leave/data.ts
Normal file
@@ -0,0 +1,200 @@
|
||||
import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { BpmCategoryApi } from '#/api/bpm/category';
|
||||
|
||||
import { useAccess } from '@vben/access';
|
||||
|
||||
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
||||
|
||||
const { hasAccessByCodes } = useAccess();
|
||||
/** 新增/修改的表单 */
|
||||
export function useFormSchema(): VbenFormSchema[] {
|
||||
return [
|
||||
{
|
||||
fieldName: 'id',
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
triggerFields: [''],
|
||||
show: () => false,
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'type',
|
||||
label: '请假类型',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
placeholder: '请选择请假类型',
|
||||
options: getDictOptions(DICT_TYPE.BPM_OA_LEAVE_TYPE, 'number'),
|
||||
allowClear: true,
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
|
||||
{
|
||||
fieldName: 'startTime',
|
||||
label: '开始时间',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
placeholder: '请选择开始时间',
|
||||
showTime: true,
|
||||
valueFormat: 'x',
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
fieldName: 'endTime',
|
||||
label: '结束时间',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
placeholder: '请选择结束时间',
|
||||
showTime: true,
|
||||
valueFormat: 'x',
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
fieldName: 'reason',
|
||||
label: '原因',
|
||||
component: 'Textarea',
|
||||
componentProps: {
|
||||
placeholder: '请输入原因',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/** 列表的搜索表单 */
|
||||
export function GridFormSchema(): VbenFormSchema[] {
|
||||
return [
|
||||
{
|
||||
fieldName: 'type',
|
||||
label: '请假类型',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
placeholder: '请选择请假类型',
|
||||
options: getDictOptions(DICT_TYPE.BPM_OA_LEAVE_TYPE, 'number'),
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'status',
|
||||
label: '审批结果',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
placeholder: '请选择审批结果',
|
||||
options: getDictOptions(
|
||||
DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS,
|
||||
'number',
|
||||
),
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'reason',
|
||||
label: '原因',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入原因',
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'createTime',
|
||||
label: '创建时间',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
...getRangePickerDefaultProps(),
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/** 列表的字段 */
|
||||
export function useGridColumns<T = BpmCategoryApi.CategoryVO>(
|
||||
onActionClick: OnActionClickFn<T>,
|
||||
): VxeTableGridOptions['columns'] {
|
||||
return [
|
||||
{
|
||||
field: 'id',
|
||||
title: '申请编号',
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
minWidth: 100,
|
||||
cellRender: {
|
||||
name: 'CellDict',
|
||||
props: { type: DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS },
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'startTime',
|
||||
title: '开始时间',
|
||||
minWidth: 180,
|
||||
formatter: 'formatDateTime',
|
||||
},
|
||||
{
|
||||
field: 'endTime',
|
||||
title: '结束时间',
|
||||
minWidth: 180,
|
||||
formatter: 'formatDateTime',
|
||||
},
|
||||
{
|
||||
field: 'type',
|
||||
title: '请假类型',
|
||||
minWidth: 100,
|
||||
cellRender: {
|
||||
name: 'CellDict',
|
||||
props: { type: DICT_TYPE.BPM_OA_LEAVE_TYPE },
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'reason',
|
||||
title: '原因',
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '申请时间',
|
||||
minWidth: 180,
|
||||
formatter: 'formatDateTime',
|
||||
},
|
||||
|
||||
{
|
||||
field: 'operation',
|
||||
title: '操作',
|
||||
minWidth: 180,
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
cellRender: {
|
||||
attrs: {
|
||||
nameField: 'name',
|
||||
nameTitle: '请假',
|
||||
onClick: onActionClick,
|
||||
},
|
||||
name: 'CellOperation',
|
||||
options: [
|
||||
{
|
||||
code: 'detail',
|
||||
text: '详情',
|
||||
show: hasAccessByCodes(['bpm:oa-leave:query']),
|
||||
},
|
||||
{
|
||||
code: 'progress',
|
||||
text: '进度',
|
||||
show: hasAccessByCodes(['bpm:oa-leave:query']),
|
||||
},
|
||||
{
|
||||
code: 'cancel',
|
||||
text: '取消',
|
||||
show: (row: any) =>
|
||||
row.status === 1 && hasAccessByCodes(['bpm:oa-leave:query']),
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
11
apps/web-antd/src/views/bpm/oa/leave/detail.vue
Normal file
11
apps/web-antd/src/views/bpm/oa/leave/detail.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<script lang="ts" setup>
|
||||
import { Page } from '@vben/common-ui';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Page>
|
||||
<div>
|
||||
<h1>请假详情</h1>
|
||||
</div>
|
||||
</Page>
|
||||
</template>
|
||||
@@ -1,34 +1,171 @@
|
||||
<script lang="ts" setup>
|
||||
import { Page } from '@vben/common-ui';
|
||||
import type { PageParam } from '@vben/request';
|
||||
|
||||
import { Button } from 'ant-design-vue';
|
||||
import type {
|
||||
OnActionClickParams,
|
||||
VxeTableGridOptions,
|
||||
} from '#/adapter/vxe-table';
|
||||
import type { BpmOALeaveApi } from '#/api/bpm/oa/leave';
|
||||
|
||||
import { h } from 'vue';
|
||||
|
||||
import { Page, prompt } from '@vben/common-ui';
|
||||
import { Plus } from '@vben/icons';
|
||||
|
||||
import { Button, message, Textarea } from 'ant-design-vue';
|
||||
|
||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { getLeavePage } from '#/api/bpm/oa/leave';
|
||||
import { cancelProcessInstanceByStartUser } from '#/api/bpm/processInstance';
|
||||
import { DocAlert } from '#/components/doc-alert';
|
||||
import { router } from '#/router';
|
||||
|
||||
import { GridFormSchema, useGridColumns } from './data';
|
||||
|
||||
const [Grid, gridApi] = useVbenVxeGrid({
|
||||
formOptions: {
|
||||
schema: GridFormSchema(),
|
||||
},
|
||||
gridOptions: {
|
||||
columns: useGridColumns(onActionClick),
|
||||
height: 'auto',
|
||||
keepSource: true,
|
||||
proxyConfig: {
|
||||
ajax: {
|
||||
query: async ({ page }: PageParam, formValues: any) => {
|
||||
return await getLeavePage({
|
||||
pageNo: page.currentPage,
|
||||
pageSize: page.pageSize,
|
||||
...formValues,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
rowConfig: {
|
||||
keyField: 'id',
|
||||
},
|
||||
toolbarConfig: {
|
||||
refresh: { code: 'query' },
|
||||
search: true,
|
||||
},
|
||||
} as VxeTableGridOptions<BpmOALeaveApi.LeaveVO>,
|
||||
});
|
||||
|
||||
/** 创建请假 */
|
||||
function onCreate() {
|
||||
router.push({
|
||||
name: 'OALeaveCreate',
|
||||
query: {
|
||||
formType: 'create',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 查看请假详情 */
|
||||
const onDetail = (row: BpmOALeaveApi.LeaveVO) => {
|
||||
router.push({
|
||||
name: 'OALeaveDetail',
|
||||
query: { id: row.id },
|
||||
});
|
||||
};
|
||||
|
||||
/** 取消请假 */
|
||||
const onCancel = (row: BpmOALeaveApi.LeaveVO) => {
|
||||
prompt({
|
||||
async beforeClose(scope) {
|
||||
if (scope.isConfirm) {
|
||||
if (scope.value) {
|
||||
try {
|
||||
await cancelProcessInstanceByStartUser(row.id, scope.value);
|
||||
message.success('取消成功');
|
||||
onRefresh();
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
message.error('请输入取消原因');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
component: () => {
|
||||
return h(Textarea, {
|
||||
placeholder: '请输入取消原因',
|
||||
allowClear: true,
|
||||
rows: 2,
|
||||
rules: [{ required: true, message: '请输入取消原因' }],
|
||||
});
|
||||
},
|
||||
content: '请输入取消原因',
|
||||
title: '取消流程',
|
||||
modelPropName: 'value',
|
||||
});
|
||||
};
|
||||
|
||||
/** 审批进度 */
|
||||
const onProgress = (row: BpmOALeaveApi.LeaveVO) => {
|
||||
router.push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: { id: row.processInstanceId },
|
||||
});
|
||||
};
|
||||
|
||||
/** 表格操作按钮的回调函数 */
|
||||
function onActionClick({
|
||||
code,
|
||||
row,
|
||||
}: OnActionClickParams<BpmOALeaveApi.LeaveVO>) {
|
||||
switch (code) {
|
||||
case 'cancel': {
|
||||
onCancel(row);
|
||||
break;
|
||||
}
|
||||
case 'detail': {
|
||||
onDetail(row);
|
||||
break;
|
||||
}
|
||||
case 'progress': {
|
||||
onProgress(row);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 刷新表格 */
|
||||
function onRefresh() {
|
||||
gridApi.query();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Page>
|
||||
<Page auto-content-height>
|
||||
<DocAlert
|
||||
title="审批接入(业务表单)"
|
||||
url="https://doc.iocoder.cn/bpm/use-business-form/"
|
||||
/>
|
||||
<Button
|
||||
danger
|
||||
type="link"
|
||||
target="_blank"
|
||||
href="https://github.com/yudaocode/yudao-ui-admin-vue3"
|
||||
>
|
||||
该功能支持 Vue3 + element-plus 版本!
|
||||
</Button>
|
||||
<br />
|
||||
<Button
|
||||
type="link"
|
||||
target="_blank"
|
||||
href="https://github.com/yudaocode/yudao-ui-admin-vue3/blob/master/src/views/bpm/oa/leave/index"
|
||||
>
|
||||
可参考
|
||||
https://github.com/yudaocode/yudao-ui-admin-vue3/blob/master/src/views/bpm/oa/leave/index
|
||||
代码,pull request 贡献给我们!
|
||||
</Button>
|
||||
|
||||
<Grid table-title="请假列表">
|
||||
<template #toolbar-tools>
|
||||
<Button
|
||||
type="primary"
|
||||
@click="onCreate"
|
||||
v-access:code="['bpm:category:create']"
|
||||
>
|
||||
<Plus class="size-5" />
|
||||
发起请假
|
||||
</Button>
|
||||
</template>
|
||||
|
||||
<template #userIds-cell="{ row }">
|
||||
<span
|
||||
v-for="(userId, index) in row.userIds"
|
||||
:key="userId"
|
||||
class="pr-5px"
|
||||
>
|
||||
{{ dataList.find((user) => user.id === userId)?.nickname }}
|
||||
<span v-if="index < row.userIds.length - 1">、</span>
|
||||
</span>
|
||||
</template>
|
||||
</Grid>
|
||||
</Page>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user