Merge branch 'dev' into dev-cjw

This commit is contained in:
chen_junior
2025-04-30 08:39:10 +08:00
3 changed files with 55 additions and 15 deletions

View File

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

View File

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

View File

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