Merge branch 'dev-zhaoDN/version-workflow-v2' into 'dev'

feat: 流程监控调整列表数据和样式,变更流程版本要显示所选得流程版本对应得数量

See merge request itc-framework/ma/2024/front!68
This commit is contained in:
890147
2025-04-25 08:13:57 +00:00
3 changed files with 55 additions and 15 deletions

View File

@ -7,8 +7,9 @@
:columns="configColumns"> :columns="configColumns">
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'activityFlag'" <template v-if="column.dataIndex === 'activityFlag'"
>{{ record.activityFlag == 1 ? t('当前版本') : '' }} >{{ record.activityFlag == 1 ? t('新流程使用版本') : '' }}
</template> </template>
<template v-if="column.dataIndex === 'operation'"> <template v-if="column.dataIndex === 'operation'">
<div class="flex"> <div class="flex">
<a-button <a-button
@ -44,11 +45,13 @@ const props = withDefaults(
processDefinitionKey: string, processDefinitionKey: string,
processIds: Array<string>, processIds: Array<string>,
schemaId: string, schemaId: string,
processDefinitionIds: Array<string>;
}>(), }>(),
{ {
processDefinitionKey: '', processDefinitionKey: '',
processIds: () => [], processIds: () => [],
schemaId: '', schemaId: '',
processDefinitionIds: () => [],
}, },
); );
@ -66,9 +69,12 @@ const configColumns = [
{ {
title: t('状态'), title: t('状态'),
dataIndex: 'activityFlag', dataIndex: 'activityFlag',
sorter: { width: 100,
multiple: 4, },
}, {
title: t('将会变更的流程数量'),
dataIndex: 'chooseCount',
width: 120,
}, },
{ {
title: t('版本'), title: t('版本'),
@ -77,6 +83,7 @@ const configColumns = [
{ {
title: t('创建人'), title: t('创建人'),
dataIndex: 'createUserName', dataIndex: 'createUserName',
width: 120,
}, },
{ {
title: t('备注'), title: t('备注'),
@ -86,6 +93,7 @@ const configColumns = [
{ {
title: t('创建时间'), title: t('创建时间'),
dataIndex: 'createDate', dataIndex: 'createDate',
width: 120,
}, },
{ {
title: t('操作'), title: t('操作'),
@ -129,6 +137,17 @@ const getHistoryList = async () => {
try { try {
let res = await getHistory(props.schemaId); let res = await getHistory(props.schemaId);
data.dataSource = res; data.dataSource = res;
data.dataSource.forEach((item) => {
item.chooseCount = 0; // 初始化选中状态
props.processDefinitionIds.forEach((id) => {
if (item.definitionId === id) {
item.chooseCount++; // 选中状态+1
}
});
if (item.chooseCount == 0) {
item.chooseCount = '';//置空
}
});
} }
catch (error) {} catch (error) {}
} }
@ -182,4 +201,4 @@ function preview(xml: string) {
flex: 1; flex: 1;
} }
} }
</style> </style>

View File

@ -19,7 +19,7 @@
> >
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'activityFlag'" <template v-if="column.dataIndex === 'activityFlag'"
>{{ record.activityFlag == 1 ? t('当前版本') : '' }} >{{ record.activityFlag == 1 ? t('新流程使用版本') : '' }}
</template> </template>
<template v-if="column.dataIndex === 'operation'"> <template v-if="column.dataIndex === 'operation'">
<div class="flex"> <div class="flex">

View File

@ -82,6 +82,7 @@
:processDefinitionKey="versionData.definitionKey" :processDefinitionKey="versionData.definitionKey"
:schemaId="versionData.schemaId" :schemaId="versionData.schemaId"
:processIds="versionData.processIds" :processIds="versionData.processIds"
:processDefinitionIds="versionData.processDefinitionIds"
@register="registerUpdateProcessVersionModal" @register="registerUpdateProcessVersionModal"
@success="() => { @success="() => {
data.visibleVersion = false; data.visibleVersion = false;
@ -114,6 +115,7 @@
import { BasicTable, useTable, FormSchema, BasicColumn } from '/@/components/Table'; import { BasicTable, useTable, FormSchema, BasicColumn } from '/@/components/Table';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { s } from '@fullcalendar/core/internal-common';
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
const router = useRouter(); const router = useRouter();
@ -131,6 +133,25 @@
multiple: 1, multiple: 1,
}, },
align: 'left', align: 'left',
width: 50,
},
{
title: t('标题'),
dataIndex: 'processName',
width: 300,
sorter: {
multiple: 3,
},
align: 'left',
},
{
title: t('流程'),
dataIndex: 'schemaName',
width: 120,
sorter: {
multiple: 3,
},
align: 'left',
}, },
{ {
title: t('任务'), title: t('任务'),
@ -141,15 +162,6 @@
}, },
align: 'left', align: 'left',
}, },
{
title: t('标题'),
dataIndex: 'schemaName',
width: 120,
sorter: {
multiple: 3,
},
align: 'left',
},
{ {
title: t('状态'), title: t('状态'),
dataIndex: 'status', dataIndex: 'status',
@ -158,6 +170,7 @@
}, },
align: 'left', align: 'left',
slots: { customRender: 'status' }, slots: { customRender: 'status' },
width: 70,
}, },
// { // {
// title: '状态详情', // title: '状态详情',
@ -168,17 +181,20 @@
dataIndex: 'currentProgress', dataIndex: 'currentProgress',
align: 'left', align: 'left',
slots: { customRender: 'currentProgress' }, slots: { customRender: 'currentProgress' },
width: 50,
}, },
{ {
title: t('流程版本'), title: t('流程版本'),
dataIndex: 'processDefinitionId', dataIndex: 'processDefinitionId',
align: 'left', align: 'left',
slots: { customRender: 'processDefinitionId' }, slots: { customRender: 'processDefinitionId' },
width: 200,
}, },
{ {
title: t('发起人'), title: t('发起人'),
dataIndex: 'originator', dataIndex: 'originator',
align: 'left', align: 'left',
width: 70,
}, },
{ {
title: t('时间'), title: t('时间'),
@ -421,6 +437,7 @@
definitionKey: '', definitionKey: '',
schemaId: '', schemaId: '',
processIds: [], processIds: [],
processDefinitionIds: [],
} }
/** /**
* 更新选中的流程图对应的执行流程的版本 * 更新选中的流程图对应的执行流程的版本
@ -431,6 +448,10 @@
versionData.definitionKey = selectRows[0].processDefinitionKey; versionData.definitionKey = selectRows[0].processDefinitionKey;
versionData.schemaId = selectRows[0].schemaId; versionData.schemaId = selectRows[0].schemaId;
versionData.processIds = selectRows.map(selectRows => selectRows.processId); versionData.processIds = selectRows.map(selectRows => selectRows.processId);
versionData.processDefinitionIds = [];//置空
selectRows.forEach(element => {
versionData.processDefinitionIds.push(element.processDefinitionId);
});
await getNextTick(); await getNextTick();
openUpdateProcessVersionModal(); openUpdateProcessVersionModal();
} }