mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 新增流程表达式功能
This commit is contained in:
@ -8,13 +8,15 @@ interface Props {
|
||||
size?: 'small' | 'medium' | 'large';
|
||||
placeholder?: string;
|
||||
closable?: boolean;
|
||||
threadshold?: number; // 超过该数量显示popover
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
placeholder: '无',
|
||||
closable: false
|
||||
closable: false,
|
||||
threadshold: 1 // 默认超过1个就显示popover
|
||||
});
|
||||
|
||||
interface Emits {
|
||||
@ -41,9 +43,17 @@ function handleClose(index?: number) {
|
||||
</NTag>
|
||||
</template>
|
||||
|
||||
<template v-else-if="tags.length === 1">
|
||||
<NTag :type="type" :size="size" :closable="closable" @close="handleClose(0)">
|
||||
{{ tags[0] }}
|
||||
<template v-else-if="tags.length <= threadshold">
|
||||
<NTag
|
||||
v-for="(tag, index) in tags"
|
||||
:key="index"
|
||||
:type="type"
|
||||
class="m-1"
|
||||
:size="size"
|
||||
:closable="closable"
|
||||
@close="handleClose(index)"
|
||||
>
|
||||
{{ tag }}
|
||||
</NTag>
|
||||
</template>
|
||||
|
@ -7,7 +7,7 @@ import { fetchGetOssListByIds } from '@/service/api/system/oss';
|
||||
import { useDict } from '@/hooks/business/dict';
|
||||
import { useDownload } from '@/hooks/business/download';
|
||||
import DictTag from '@/components/custom/dict-tag.vue';
|
||||
import GroupTag from '@/components/custom/group-tag.vue';
|
||||
import TagGroup from '@/components/custom/tag-group.vue';
|
||||
|
||||
defineOptions({
|
||||
name: 'ApprovalInfoPanel'
|
||||
@ -39,7 +39,7 @@ const columns = ref<NaiveUI.TableColumn<Api.Workflow.HisTask>[]>([
|
||||
align: 'center',
|
||||
width: 100,
|
||||
render: row => {
|
||||
return <GroupTag value={row.approveName} />;
|
||||
return <TagGroup value={row.approveName} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -164,7 +164,7 @@ watch(visible, () => {
|
||||
{{ taskInfo?.instanceId }}
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem label="办理人">
|
||||
<GroupTag :value="assigneeNames" />
|
||||
<TagGroup :value="assigneeNames" />
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem label="版本号">
|
||||
<NTag type="info" size="small">v{{ taskInfo?.version }}.0</NTag>
|
||||
|
@ -388,7 +388,7 @@ watch(visible, () => {
|
||||
<NFormItem v-if="buttonPerm.copy" label="抄送人员">
|
||||
<NSpace>
|
||||
<NButton ghost type="primary" @click="openCopyModal">选择抄送人员</NButton>
|
||||
<GroupTag
|
||||
<TagGroup
|
||||
size="large"
|
||||
:value="selectCopyUserList.map(item => item.nickName)"
|
||||
:closable="true"
|
||||
@ -407,7 +407,7 @@ watch(visible, () => {
|
||||
<NSpace>
|
||||
<NButton ghost type="primary" @click="handleAssigneeOpen(item)">选择审批人员</NButton>
|
||||
<NInput v-if="false" v-model:value="model.assigneeMap![item.nodeCode]" />
|
||||
<GroupTag
|
||||
<TagGroup
|
||||
size="large"
|
||||
:value="nickNameMap[item.nodeCode]"
|
||||
:closable="true"
|
||||
|
Reference in New Issue
Block a user