!191 Merge remote-tracking branch 'yudao/dev' into dev

Merge pull request !191 from Jason/dev
pull/193/MERGE
xingyu 2025-08-06 03:30:54 +00:00 committed by Gitee
commit ce1f3735ad
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 39 additions and 8 deletions

View File

@ -359,7 +359,8 @@ async function saveConfig() {
currentNode.value.signEnable = configForm.value.signEnable;
//
currentNode.value.reasonRequire = configForm.value.reasonRequire;
//
currentNode.value.skipExpression = configForm.value.skipExpression;
currentNode.value.showText = getShowText();
drawerApi.close();
return true;
@ -443,7 +444,8 @@ function showUserTaskNodeConfig(node: SimpleFlowNode) {
configForm.value.signEnable = node?.signEnable ?? false;
// 7.
configForm.value.reasonRequire = node?.reasonRequire ?? false;
// 8.
configForm.value.skipExpression = node?.skipExpression ?? '';
drawerApi.open();
}
@ -850,7 +852,7 @@ onMounted(() => {
label="流程表达式"
name="expression"
>
<Textarea v-model:value="configForm.expression" clearable />
<Textarea v-model:value="configForm.expression" allow-clear />
</FormItem>
<!-- 多人审批/办理 方式 -->
<FormItem :label="`多人${nodeTypeName}方式`" name="approveMethod">
@ -1117,6 +1119,16 @@ onMounted(() => {
/>
</FormItem>
</div>
<div>
<Divider content-position="left">跳过表达式</Divider>
<FormItem prop="skipExpression">
<Textarea
v-model:value="configForm.skipExpression"
allow-clear
:rows="2"
/>
</FormItem>
</div>
</Form>
</div>
</TabPane>

View File

@ -602,6 +602,8 @@ export interface SimpleFlowNode {
signEnable?: boolean;
// 审批意见
reasonRequire?: boolean;
// 跳过表达式
skipExpression?: string;
// 触发器设置
triggerSetting?: TriggerSetting;
// 子流程

View File

@ -214,6 +214,7 @@ export type UserTaskFormType = {
returnNodeId?: string;
roleIds?: number[]; // 角色
signEnable: boolean;
skipExpression?: string; // 跳过表达式
taskAssignListener?: {
body: HttpRequestParam[];
header: HttpRequestParam[];

View File

@ -979,11 +979,11 @@ export enum BpmTaskStatusEnum {
*
*/
APPROVE = 2,
/**
*
*/
APPROVING = 7,
/**
*
*/
@ -992,7 +992,6 @@ export enum BpmTaskStatusEnum {
*
*/
NOT_START = -1,
/**
*
*/
@ -1002,10 +1001,15 @@ export enum BpmTaskStatusEnum {
* 退
*/
RETURN = 5,
/**
*
*/
RUNNING = 1,
/**
*
*/
SKIP = -2,
/**
*
*/

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import { computed, ref, watch } from 'vue';
import { computed, provide, ref, watch } from 'vue';
import { CircleHelp } from '@vben/icons';
@ -146,7 +146,7 @@ function handleTaskAfterTriggerEnableChange(val: boolean | number | string) {
: null;
}
/** 表单选项 */
/** 表单字段 */
const formField = ref<Array<{ field: string; title: string }>>([]);
const formFieldOptions4Title = computed(() => {
const cloneFormField = formField.value.map((item) => {
@ -178,6 +178,9 @@ const formFieldOptions4Summary = computed(() => {
};
});
});
const unParsedFormFields = ref<string[]>([]); //
// HttpRequestSetting 使
provide('formFields', unParsedFormFields);
/** 兼容以前未配置更多设置的流程 */
function initData() {
@ -230,6 +233,7 @@ watch(
const data = await FormApi.getFormDetail(newFormId);
const result: Array<{ field: string; title: string }> = [];
if (data.fields) {
unParsedFormFields.value = data.fields;
data.fields.forEach((fieldStr: string) => {
parseFormFields(JSON.parse(fieldStr), result);
});
@ -237,6 +241,7 @@ watch(
formField.value = result;
} else {
formField.value = [];
unParsedFormFields.value = [];
}
},
{ immediate: true },

View File

@ -43,6 +43,8 @@ const statusIconMap: Record<
string,
{ animation?: string; color: string; icon: string }
> = {
//
'-2': { color: '#909398', icon: 'mdi:skip-forward-outline' },
//
'-1': { color: '#909398', icon: 'mdi:clock-outline' },
//
@ -285,7 +287,12 @@ defineExpose({ setCustomApproveUsers, batchSetCustomApproveUsers });
>
<!-- 第一行节点名称时间 -->
<div class="flex w-full">
<div class="font-bold">{{ activity.name }}</div>
<div class="font-bold">
{{ activity.name }}
<span v-if="activity.status === BpmTaskStatusEnum.SKIP">
跳过
</span>
</div>
<!-- 信息时间 -->
<div
v-if="activity.status !== BpmTaskStatusEnum.NOT_START"