mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-14 01:00:54 +08:00
fix(workflow): 移除表单附件默认值并优化时间线样式
移除apply-modal、approval-modal、approval-rejection-modal中附件上传字段的冗余defaultValue配置,避免潜在的表单数据冲突。同时调整approval-timeline组件样式,禁用非完成状态项的悬停颜色,并增加时间线项间距以改善视觉呈现。在approval-timeline-item中使用DictTag组件替代renderDict函数以提升字典渲染的一致性和可维护性。
This commit is contained in:
@@ -103,7 +103,6 @@ const [BasicForm, formApi] = useVbenForm({
|
||||
maxSize: 20,
|
||||
accept: 'png, jpg, jpeg, doc, docx, xlsx, xls, ppt, pdf',
|
||||
},
|
||||
defaultValue: [],
|
||||
label: '附件上传',
|
||||
formItemClass: 'items-start',
|
||||
},
|
||||
|
||||
@@ -62,7 +62,6 @@ const [BasicForm, formApi] = useVbenForm({
|
||||
maxSize: 20,
|
||||
accept: 'png, jpg, jpeg, doc, docx, xlsx, xls, ppt, pdf',
|
||||
},
|
||||
defaultValue: [],
|
||||
label: '附件上传',
|
||||
formItemClass: 'items-start',
|
||||
},
|
||||
|
||||
@@ -58,7 +58,6 @@ const [BasicForm, formApi] = useVbenForm({
|
||||
maxSize: 20,
|
||||
accept: 'png, jpg, jpeg, doc, docx, xlsx, xls, ppt, pdf',
|
||||
},
|
||||
defaultValue: [],
|
||||
label: '附件上传',
|
||||
formItemClass: 'items-start',
|
||||
},
|
||||
|
||||
@@ -10,7 +10,8 @@ import { MessageOutlined, UserOutlined } from '@antdv-next/icons';
|
||||
import { Avatar } from 'antdv-next';
|
||||
|
||||
import { ossInfo } from '#/api/system/oss';
|
||||
import { renderDict } from '#/utils/render';
|
||||
import { DictTag } from '#/components/dict';
|
||||
import { getDictOptions } from '#/utils/dict';
|
||||
|
||||
defineOptions({
|
||||
name: 'ApprovalTimelineItem',
|
||||
@@ -43,14 +44,16 @@ onMounted(async () => {
|
||||
const isMultiplePerson = computed(
|
||||
() => props.item.approver?.split(',').length > 1,
|
||||
);
|
||||
|
||||
const flowStatusOptions = getDictOptions(DictEnum.WF_TASK_STATUS);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div class="mb-5 ml-2 flex flex-col gap-1">
|
||||
<div :class="cn('mb-5 ml-2 flex flex-col gap-1', 'mt-[-8px]')">
|
||||
<div class="flex items-center gap-1">
|
||||
<div class="font-bold">{{ item.nodeName }}</div>
|
||||
<component :is="renderDict(item.flowStatus, DictEnum.WF_TASK_STATUS)" />
|
||||
<DictTag :value="item.flowStatus" :dicts="flowStatusOptions" />
|
||||
</div>
|
||||
|
||||
<div :class="cn('mt-2 flex flex-wrap gap-2')" v-if="isMultiplePerson">
|
||||
|
||||
@@ -60,6 +60,21 @@ const items = computed<TimelineProps['items']>(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Timeline v-if="list.length > 0" :items="items" />
|
||||
<Timeline
|
||||
v-if="list.length > 0"
|
||||
:items="items"
|
||||
:styles="{
|
||||
item: {
|
||||
/**
|
||||
* 非finish状态hover会有加上primary色 不需要
|
||||
*/
|
||||
'--ant-cmp-steps-item-text-hover-color': 'initial',
|
||||
/**
|
||||
* 时间线之间的间距 默认12px
|
||||
*/
|
||||
'--ant-padding-sm': '16px',
|
||||
},
|
||||
}"
|
||||
/>
|
||||
<Empty v-else />
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user