fix 修复 一些问题
This commit is contained in:
parent
e8d42a5434
commit
df129b08bf
@ -53,6 +53,7 @@ export const deleteDefinition = (id: string | string[]) => {
|
||||
/**
|
||||
* 挂起/激活
|
||||
* @param definitionId 流程定义id
|
||||
* @param activityStatus 状态
|
||||
* @returns
|
||||
*/
|
||||
export const active = (definitionId: string, activityStatus: boolean) => {
|
||||
@ -60,7 +61,7 @@ export const active = (definitionId: string, activityStatus: boolean) => {
|
||||
url: `/workflow/definition/active/${definitionId}`,
|
||||
method: 'put',
|
||||
params: {
|
||||
activityStatus: activityStatus
|
||||
active: activityStatus
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -11,7 +11,7 @@ export interface FlowDefinitionVo {
|
||||
flowCode: string;
|
||||
version: string;
|
||||
isPublish: number;
|
||||
activityStatus: boolean;
|
||||
activityStatus: number;
|
||||
createTime: Date;
|
||||
updateTime: Date;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ export interface FlowInstanceVO extends BaseEntity {
|
||||
flowCode: string;
|
||||
version: string;
|
||||
businessId: string;
|
||||
activityStatus?: any;
|
||||
activityStatus: number;
|
||||
tenantId: string;
|
||||
createTime: string;
|
||||
createBy: string;
|
||||
|
@ -224,7 +224,7 @@ const handleCancelProcessApply = async (id: string) => {
|
||||
loading.value = true;
|
||||
let data = {
|
||||
businessId: id,
|
||||
message: '撤销流程!'
|
||||
message: '申请人撤销流程!'
|
||||
};
|
||||
await cancelProcessApply(data).finally(() => (loading.value = false));
|
||||
await getList();
|
||||
|
@ -71,7 +71,7 @@
|
||||
<el-tag v-else-if="scope.row.activityStatus == 1" type="success">激活</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="isPublish" label="发布状态" width="80">
|
||||
<el-table-column align="center" prop="isPublish" label="发布状态" width="100">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.isPublish == 0" type="danger">未发布</el-tag>
|
||||
<el-tag v-else-if="scope.row.isPublish == 1" type="success">已发布</el-tag>
|
||||
@ -86,10 +86,10 @@
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
:icon="!scope.row.activityStatus ? 'Lock' : 'Unlock'"
|
||||
:icon="scope.row.activityStatus == 0 ? 'Lock' : 'Unlock'"
|
||||
@click="handleProcessDefState(scope.row)"
|
||||
>
|
||||
{{ scope.row.activityStatus ? '挂起流程' : '激活流程' }}
|
||||
{{ scope.row.activityStatus == 0 ? '激活流程' : '挂起流程' }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -423,14 +423,14 @@ const handlePublish = async (row?: FlowDefinitionVo) => {
|
||||
/** 挂起/激活 */
|
||||
const handleProcessDefState = async (row: FlowDefinitionVo) => {
|
||||
let msg: string;
|
||||
if (row.activityStatus) {
|
||||
if (row.activityStatus == 1) {
|
||||
msg = `暂停后,此流程下的所有任务都不允许往后流转,您确定挂起【${row.flowName || row.flowCode}】吗?`;
|
||||
} else {
|
||||
msg = `启动后,此流程下的所有任务都允许往后流转,您确定激活【${row.flowName || row.flowCode}】吗?`;
|
||||
}
|
||||
await proxy?.$modal.confirm(msg);
|
||||
loading.value = true;
|
||||
await active(row.id, row.activityStatus).finally(() => (loading.value = false));
|
||||
await active(row.id, row.activityStatus == 0).finally(() => (loading.value = false));
|
||||
await getList();
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
};
|
||||
|
@ -232,7 +232,7 @@ const handleCancelProcessApply = async (businessId: string) => {
|
||||
if ('running' === tab.value) {
|
||||
let data = {
|
||||
businessId: businessId,
|
||||
message: '撤销流程!'
|
||||
message: '申请人撤销流程!'
|
||||
};
|
||||
await cancelProcessApply(data).finally(() => (loading.value = false));
|
||||
getList();
|
||||
|
Loading…
x
Reference in New Issue
Block a user